<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <meta name="description" content="ls:显示目录内容列表 - 最专业的Linux命令大全，内容包含Linux命令手册、详解、学习，值得收藏的Linux命令速查手册。">
    <meta name="keywords" content="Linux,Command,命令大全,Linux命令手册,ls,显示目录内容列表">
    <title>ls 命令，Linux ls 命令详解：显示目录内容列表 -  Linux 命令搜索引擎</title>
    <link rel="shortcut icon" href="../img/favicon.ico">
    <link rel="stylesheet" type="text/css" href="../css/index.css?v=1667366370134">
    <script src="../js/dark-mode.min.js"></script>
    <script type="module" src="../js/github-corners.js"></script>
</head>
<body>
<dark-mode permanent dark="Dark" light="Light" style="position: fixed;left: 10px;top: 8px; z-index: 999;"></dark-mode>

<div class="header header_list">
  <div class="header_inner">
      <div class="logo">
          <a href="/">
            <svg width="183px" height="48px" viewBox="0 0 183 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- kenny wang <wowohoo@qq.com> https://github.com/jaywcjlove --> <title>logo</title> <desc>Linux Command Logo. https://github.com/jaywcjlove</desc><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g transform="translate(-576.000000, -261.000000)" fill="currentColor"> <g id="logo" transform="translate(576.000000, 261.000000)"> <path d="M20.4917792,0.000336524232 C20.1886146,-0.000100520225 19.8723998,0.0124863601 19.542641,0.0387964365 C11.2083649,0.710004944 13.4186692,9.51473754 13.2949769,12.4631618 C13.1427718,14.6193207 12.7056049,16.3185233 11.2226825,18.426428 C9.48047033,20.4982285 7.02763261,23.8514609 5.86566251,27.3420607 C5.3172635,28.9894735 5.05630425,30.6686289 5.29730805,32.2578406 C5.22181299,32.325447 5.14994103,32.3962788 5.08160039,32.469239 C4.57008792,33.0153217 4.19213625,33.6769851 3.77100458,34.1224689 C3.37755968,34.5149436 2.81698897,34.6642292 2.20097918,34.8852382 C1.58472464,35.1063477 0.908127379,35.4323261 0.497432332,36.2204265 C0.497432332,36.2204265 0.497432332,36.2207368 0.49712203,36.2207368 C0.496684986,36.222048 0.495373852,36.2233591 0.494936808,36.2246702 L0.494936808,36.2246702 C0.123151829,36.919077 0.233680372,37.718746 0.347224522,38.4596325 C0.460773043,39.2004972 0.575720105,39.9005856 0.423139144,40.3755699 C-0.0645762474,41.7086473 -0.126850712,42.6307542 0.216491414,43.2996202 C0.560563403,43.9698759 1.2680029,44.2657113 2.06756262,44.432706 C3.66668644,44.7666954 5.83232039,44.6837094 7.53908826,45.5883128 L7.68579097,45.3115063 L7.54060917,45.5891344 C9.36778716,46.5444437 11.2201913,46.8837519 12.698079,46.5461831 C13.7695766,46.3014513 14.6393781,45.6634363 15.0860725,44.6816946 C16.2420201,44.6760567 17.5104717,44.1864315 19.5423657,44.0745568 C20.9208039,43.9635213 22.6427241,44.564051 24.6233484,44.4540775 C24.6751207,44.6689591 24.750052,44.8756375 24.8526175,45.0720452 C24.8539287,45.0742305 24.8548028,45.0759786 24.8556769,45.0780328 C25.6234722,46.6133699 27.0500902,47.3156173 28.570428,47.1956355 C30.0927718,47.075492 31.711331,46.1778551 33.0196848,44.6208231 L32.7798304,44.4192582 L33.0215204,44.618616 C34.2685787,43.1065034 36.3384911,42.4794975 37.7110118,41.6516741 C38.3972721,41.2377581 38.9541192,40.7194802 38.9971462,39.966706 C39.0401514,39.2142991 38.5984218,38.3711223 37.5826868,37.2436088 L37.5823765,37.2432985 C37.5820662,37.2428614 37.5815024,37.2424244 37.5810654,37.2415503 C37.2473295,36.8644028 37.0881185,36.1654026 36.91702,35.4210285 C36.7460395,34.6771089 36.5551865,33.8746254 35.9444344,33.3545687 L35.9444344,33.3545687 C35.9431233,33.3532575 35.9418121,33.3523835 35.940938,33.3515094 L35.940938,33.3515094 C35.6978714,33.1397045 35.4452772,32.9959518 35.1909042,32.8993694 C36.0400422,30.3810493 35.7068789,27.8734149 34.8497254,25.6073831 C33.7977638,22.8263338 31.9611937,20.4030752 30.5585738,18.7453569 C28.9885703,16.7650385 27.4529665,14.8848863 27.4832187,12.1079627 C27.5299825,7.86977213 27.9494053,0.0101787654 20.4914689,0 L20.4917792,0.000336524232 Z M21.5014393,6.5296802 C21.9246338,6.5296802 22.2860696,6.65372652 22.6573476,6.92320377 C23.0345213,7.1969553 23.3062494,7.53965497 23.5252523,8.01821865 C23.7401952,8.48461502 23.843613,8.94086321 23.8537568,9.48229573 C23.8537568,9.49649968 23.8537568,9.50864951 23.8576902,9.52285346 C23.8616236,10.0784681 23.7664397,10.5509481 23.5555483,11.0335676 C23.4352081,11.3089536 23.2970146,11.540089 23.1316064,11.7401941 C23.0754506,11.7132285 23.0171357,11.6873118 22.9566488,11.6624396 L22.9566488,11.6624396 C22.5373789,11.4828667 22.2157491,11.3685884 21.9476879,11.2755722 C22.044856,11.158772 22.1257661,11.0202464 22.1969169,10.8470719 C22.3043949,10.5854877 22.3571155,10.3299784 22.367255,10.025813 C22.367255,10.0136631 22.3711884,10.00348 22.3711884,9.98931975 C22.3772633,9.69732161 22.3387597,9.44789596 22.2535753,9.19239103 C22.1643483,8.92472316 22.0507955,8.73208707 21.886541,8.57188842 C21.722291,8.41168541 21.5580366,8.33869024 21.361336,8.33260221 C21.3521143,8.33216517 21.3429364,8.33216517 21.3338459,8.33216517 C21.1488275,8.33260221 20.9881699,8.39616596 20.8219532,8.53532529 C20.6475593,8.6813331 20.5177834,8.86788115 20.4103054,9.12744186 C20.3028318,9.38699819 20.2501067,9.64452664 20.239976,9.95073309 C20.2377908,9.96288293 20.2377908,9.97306607 20.2377908,9.9852159 C20.2342945,10.1535261 20.2449584,10.307711 20.2709188,10.4574381 C19.8923378,10.2687966 19.535574,10.1401875 19.2007499,10.0604924 C19.181651,9.91570835 19.1706375,9.76629596 19.1670975,9.61007442 L19.1670975,9.56750629 C19.1610225,9.01391519 19.2522643,8.53941165 19.4651836,8.05679657 C19.6781029,7.57417712 19.9417194,7.2274173 20.3128051,6.94555422 C20.6838952,6.66369114 21.0488973,6.53391079 21.4808239,6.52985938 L21.5010154,6.52985938 L21.5014393,6.5296802 Z M15.7091362,6.98827969 C15.9898804,6.98871673 16.2410892,7.0827381 16.5009296,7.29023807 C16.7828014,7.51531597 16.9957164,7.80326271 17.1741616,8.20882685 C17.3526112,8.614391 17.4479175,9.01995077 17.4742757,9.49851445 L17.4742757,9.50244785 C17.4870374,9.70344023 17.485464,9.89263677 17.469643,10.0758677 C17.4141165,10.091645 17.3597045,10.1087334 17.3064069,10.1270762 C17.0036968,10.2312719 16.7369205,10.373272 16.5044085,10.5268101 C16.5271785,10.366205 16.5305437,10.2032486 16.5131057,10.0215605 C16.5109204,10.0114211 16.5109204,10.0032921 16.5109204,9.99319633 C16.4865771,9.75189098 16.435893,9.54911109 16.3507218,9.34429895 C16.2594713,9.131384 16.1580813,8.98132478 16.0242452,8.86573527 C15.9029566,8.76098882 15.7883592,8.71289208 15.6622806,8.71384046 C15.6492567,8.71384046 15.636058,8.71427751 15.6227281,8.71558864 C15.4807804,8.72773848 15.3631674,8.79669098 15.251638,8.93255936 C15.1401086,9.068419 15.0671091,9.23672919 15.0143884,9.4597792 C14.9616634,9.68284232 14.9474682,9.90184967 14.9697706,10.1532945 C14.9697706,10.1634339 14.9719558,10.1715629 14.9719558,10.1816586 C14.9962992,10.4249963 15.0449553,10.6277718 15.1321501,10.8325883 C15.2213771,11.0434797 15.3247905,11.1935346 15.4586266,11.3091153 C15.481047,11.3284764 15.5032139,11.3458708 15.525289,11.361399 C15.3860816,11.468536 15.3196072,11.5179308 15.2055298,11.6017559 C15.1323642,11.6554425 15.0452263,11.7193646 14.94395,11.7940162 C14.7230765,11.5871106 14.5507673,11.3270648 14.4001137,10.984671 C14.2216641,10.5791112 14.1263578,10.1735471 14.0979674,9.69498342 L14.0979674,9.69105002 C14.0716136,9.21249508 14.1182463,8.8008429 14.2500545,8.37500864 C14.3818627,7.94916563 14.5582845,7.6409444 14.813785,7.38745861 C15.06929,7.13399031 15.3268184,7.00623784 15.6370763,6.99001912 C15.6613322,6.98870799 15.6853347,6.98827095 15.709123,6.98827095 L15.7091362,6.98827969 Z M18.3434478,10.3083666 C18.9959552,10.3057443 19.7811624,10.5197693 20.731756,11.1309629 C21.3156605,11.5106715 21.7700031,11.5424053 22.8162176,11.9904939 L22.8175288,11.9909309 L22.8188399,11.991368 C23.322219,12.1979021 23.6176741,12.4671083 23.7620255,12.7505841 C23.906377,13.034073 23.9099039,13.3414857 23.7890786,13.6648724 C23.5474411,14.3116676 22.7761407,14.9923468 21.6937826,15.3303395 L21.6929085,15.3307766 L21.6920344,15.3312136 C21.1642857,15.5026793 20.7040867,15.8813302 20.1615484,16.1915706 C19.6190277,16.5017979 19.00512,16.7520102 18.1703739,16.7037212 C18.1703739,16.7037168 18.1703739,16.7037212 18.1703739,16.7037212 C17.4597396,16.6622893 17.0349499,16.4210539 16.650849,16.1123607 C16.2667437,15.8036631 15.9320245,15.4158517 15.4418966,15.1280491 L15.4405854,15.1271751 L15.4392743,15.126301 C14.6497885,14.6800742 14.2187709,14.163964 14.0834969,13.7165354 C13.9482185,13.2691068 14.075193,12.8871911 14.4668766,12.5936327 C14.9072645,12.2635986 15.2131825,12.0390976 15.4169632,11.8895453 C15.6194022,11.7409983 15.703625,11.685297 15.7680935,11.623394 C15.7684038,11.622957 15.7685305,11.622957 15.7689675,11.6225199 L15.7692735,11.6220829 C16.1001729,11.3088706 16.6276463,10.738226 17.4227569,10.4645313 C17.696421,10.3703264 18.001784,10.3095466 18.3435746,10.3081961 L18.3434478,10.3083666 Z M22.9062619,13.0069369 C22.6246829,13.0237631 22.3297828,13.1687002 21.9864013,13.3604054 C21.6430199,13.5521105 21.256878,13.7973406 20.8384079,14.0388338 C20.0014721,14.5218204 19.038047,14.9837283 18.0805918,14.9837283 C17.1216551,14.9837283 16.3555118,14.5408493 15.7808726,14.0854752 C15.4935509,13.8577838 15.2564149,13.6284404 15.0669561,13.4510265 C14.9722311,13.3623109 14.8900799,13.2867065 14.8134179,13.2276487 C14.7367734,13.1685909 14.6743853,13.1100357 14.5461303,13.1100357 L14.5400116,13.3795435 C14.5308337,13.4697233 14.5213935,13.4669437 14.5251084,13.4693999 C14.5310959,13.4733333 14.5608587,13.4835601 14.5955731,13.5103509 C14.6519344,13.5537495 14.7301609,13.6245375 14.8230067,13.7114832 C15.0086981,13.8853788 15.2554403,14.124464 15.5592255,14.3652012 C16.166796,14.8466668 17.0117515,15.3406363 18.0806093,15.3406363 C19.1509618,15.3406363 20.1636375,14.8403471 21.016875,14.3479598 C21.4434872,14.1017639 21.8309534,13.8560094 22.1604324,13.6720705 C22.4898897,13.4881185 22.7670895,13.3727781 22.9275766,13.3632068 L22.9062925,13.00695 L22.9062619,13.0069369 Z M23.8576858,14.2878093 C24.5685911,17.0901733 26.2220701,21.1378562 27.2848005,23.113201 C27.8496849,24.1612205 28.9735097,26.3878921 29.4590574,29.0706371 C29.7667148,29.0611969 30.1054855,29.1059065 30.4682673,29.1987042 C31.7377591,25.907589 29.3917525,22.3626165 28.3189832,21.375368 C27.8858722,20.9551061 27.8650557,20.7668098 28.0797669,20.7757081 C29.2436775,21.8049915 30.7716374,23.8752142 31.3275492,26.211938 C31.581035,27.2774436 31.6350799,28.3975886 31.3630809,29.5030663 C31.4961478,29.5583437 31.6312951,29.6184504 31.7682604,29.683286 C33.806037,30.6755779 34.5596721,31.5384567 34.1973186,32.716121 C34.0779748,32.7117506 33.960576,32.7126247 33.8460659,32.7152469 C33.8354021,32.7155572 33.8247819,32.715684 33.814118,32.716121 C34.1092104,31.7826203 33.4554837,31.0941179 31.7135031,30.305952 C29.9067264,29.5110511 28.4669839,29.5901387 28.2236507,31.2022427 C28.2080919,31.2867016 28.1955487,31.3727644 28.1860212,31.460029 C28.05104,31.506902 27.9153158,31.5667509 27.7792552,31.6412014 C26.9308557,32.1054213 26.4677896,32.9477371 26.2102393,33.9808403 C25.9529032,35.0131131 25.8791213,36.2610673 25.8081016,37.6639101 L25.8081016,37.6647842 C25.7647031,38.3701826 25.4746935,39.3242507 25.1805582,40.3347805 C22.2207839,42.446033 18.1128938,43.3607409 14.6251435,40.9805006 C14.3887768,40.6065916 14.1176344,40.2361221 13.8385378,39.8707355 C13.6603154,39.6373843 13.4772332,39.4054841 13.2952172,39.1768225 C13.6532528,39.1768225 13.9575843,39.1184771 14.2035442,39.0069433 C14.5094142,38.8682516 14.724322,38.6454901 14.8306462,38.3594969 C15.0432858,37.7875325 14.8297721,36.9806654 14.1489836,36.0592664 C13.4682956,35.137933 12.3154554,34.0981212 10.6214273,33.0592009 C10.6214273,33.0592009 10.621117,33.0592009 10.621117,33.0588906 C9.37658486,32.2846183 8.68057408,31.3355981 8.3547924,30.3051959 C8.02898013,29.2747018 8.07466439,28.1604089 8.32577265,27.0602631 C8.80774091,24.9485692 10.0461107,22.8947793 10.8362565,21.605909 C11.0489879,21.4493815 10.9122629,21.8964561 10.0363515,23.5230089 C9.25134103,25.0101357 7.78376323,28.4420972 9.79314068,31.1210705 C9.84684033,29.2145776 10.3021401,27.2701931 11.0664741,25.45145 C12.1797968,22.9278068 14.5084483,18.5514927 14.6933968,15.0635108 C14.7887555,15.1327561 15.1164383,15.3538525 15.2624505,15.4368866 C15.2627608,15.4373237 15.2628875,15.4373237 15.2633246,15.4373237 C15.6905181,15.6888908 16.0113611,16.0566244 16.426903,16.3905832 C16.8432709,16.7252019 17.3634237,17.0142238 18.149269,17.0600129 L18.149269,17.0600129 C19.066516,17.113092 19.7655905,16.8289912 20.3383504,16.5014745 C20.9102449,16.1744603 21.3671137,15.8125482 21.7999582,15.6712779 C21.8003952,15.6708409 21.8012693,15.6708409 21.8017063,15.6708409 C22.7163355,15.3848215 23.44356,14.8785842 23.857393,14.2881327 L23.8576858,14.2878093 Z M29.6669682,30.3312962 C30.0374289,30.329548 30.4861993,30.4530917 30.9774372,30.6728508 C32.2995623,31.2832227 32.713238,31.8063999 32.3522873,32.5749338 C32.0481219,33.1548918 30.7462669,34.0775407 29.8540319,33.8342075 C28.9435503,33.5989814 28.4994564,32.2869871 28.6474877,31.2953987 C28.7267763,30.6220356 29.1076387,30.3339097 29.6669682,30.3312962 L29.6669682,30.3312962 Z M28.1710786,32.1433306 C28.2458176,33.3559191 28.8457529,34.5926195 29.9067526,34.8602742 C31.0678224,35.1661922 32.7418469,34.16998 33.4486352,33.3574182 C33.5895689,33.3517803 33.7273516,33.3448313 33.8611658,33.3416409 C34.4811527,33.3266503 35.001157,33.3620509 35.5324588,33.8267253 L35.534207,33.8284735 L35.5359552,33.8302216 C35.9442465,34.1761336 36.1383204,34.8298385 36.3066481,35.5621545 C36.4749627,36.294475 36.6095636,37.0920505 37.11435,37.6602345 L37.115224,37.6611086 L37.1156611,37.6619827 C38.0861227,38.7388952 38.3980544,39.4668146 38.3715083,39.931406 C38.344936,40.3960279 38.008556,40.7409347 37.3873891,41.1155867 C36.1455928,41.864576 33.9453056,42.5158727 32.5399192,44.2181871 C31.3196037,45.6704378 29.8315635,46.4680352 28.5210638,46.5714617 C27.2105642,46.6748883 26.0799127,46.1309646 25.4133237,44.793071 L25.4115756,44.7900117 L25.4098274,44.7869524 C24.9962959,44.0002986 25.1685614,42.758852 25.5169207,41.4493706 C25.8652845,40.1398937 26.3657922,38.7953264 26.4327911,37.7024923 L26.4327911,37.7007442 L26.4327911,37.698996 C26.5036666,36.2987755 26.5820418,35.0759688 26.8172504,34.1324728 C27.0524633,33.1889769 27.4228236,32.5499829 28.0790545,32.1909116 C28.109604,32.1742165 28.139948,32.1584392 28.1701128,32.1435097 L28.1710786,32.1433306 Z M6.86074718,32.2348346 C6.95869322,32.2351449 7.06234705,32.2434006 7.17277507,32.2601394 C7.91559769,32.3726653 8.5633675,32.8920358 9.18746261,33.7385341 C9.8115621,34.5850455 10.3922762,35.7405823 10.9892352,37.0223812 L10.9901093,37.0241294 L10.9905463,37.0258776 C11.4702594,38.0271115 12.4825418,39.128044 13.3403902,40.2511564 C14.1982341,41.3742689 14.8621527,42.5016163 14.7756966,43.3644732 L14.7753863,43.3684066 L14.775076,43.37234 C14.6632363,44.843978 13.8330966,45.6451198 12.5587449,45.9361914 C11.2847734,46.2271625 9.55771794,45.9379396 7.83269472,45.035587 L7.83094655,45.035587 C5.9224477,44.0247687 3.65205856,44.1251622 2.19566909,43.8209924 C1.46727769,43.6688572 0.99200058,43.44013 0.773862951,43.0151698 C0.55571221,42.5902315 0.550839164,41.8488511 1.01440785,40.5847437 L1.01659307,40.5791059 L1.01834125,40.573468 C1.24759292,39.8663213 1.07793226,39.0925822 0.96663015,38.3663367 C0.855328038,37.6400911 0.800894151,36.9795116 1.04888192,36.5190765 L1.05019305,36.5168913 L1.05150418,36.514706 C1.36900824,35.9026821 1.83472718,35.683902 2.41273159,35.4765375 C2.990736,35.2691556 3.67612223,35.1062953 4.21734934,34.5638925 L4.21997161,34.5612703 L4.22259387,34.558648 C4.72293985,34.0308163 5.09877623,33.3691834 5.53863963,32.8995879 C5.90977341,32.5033678 6.28118253,32.2407652 6.84099715,32.2368755 L6.86053303,32.2368755 L6.86074718,32.2348346 Z"></path> <path d="M58.5014648,40 L58.5014648,6.7578125 L65.4194336,6.7578125 L65.4194336,35.2832031 L80.4008789,35.2832031 L80.4008789,40 L58.5014648,40 L58.5014648,40 L58.5014648,40 Z M86.2524414,40 L86.2524414,15.3378906 L92.9008789,15.3378906 L92.9008789,40 L86.2524414,40 L86.2524414,40 L86.2524414,40 Z M86.2524414,11.1826172 L86.2524414,5.63476562 L92.9008789,5.63476562 L92.9008789,11.1826172 L86.2524414,11.1826172 L86.2524414,11.1826172 L86.2524414,11.1826172 Z M100.211426,40 L100.211426,15.3378906 L106.859863,15.3378906 L106.859863,19.9873047 C109.031098,16.513329 111.8312,14.7763672 115.260254,14.7763672 C117.461437,14.7763672 119.198399,15.4726493 120.471191,16.8652344 C121.743984,18.2578195 122.380371,20.1594932 122.380371,22.5703125 L122.380371,40 L115.731934,40 L115.731934,24.2099609 C115.731934,21.4098167 114.803557,20.0097656 112.946777,20.0097656 C110.835439,20.0097656 108.806488,21.4996596 106.859863,24.4794922 L106.859863,40 L100.211426,40 L100.211426,40 L100.211426,40 Z M145.672363,40 L145.672363,35.3505859 C143.516102,38.8245616 140.716,40.5615234 137.271973,40.5615234 C135.07079,40.5615234 133.333828,39.8652413 132.061035,38.4726562 C130.788242,37.0800712 130.151855,35.1783975 130.151855,32.7675781 L130.151855,15.3378906 L136.800293,15.3378906 L136.800293,31.1279297 C136.800293,33.9280739 137.736156,35.328125 139.60791,35.328125 C141.704275,35.328125 143.725739,33.838231 145.672363,30.8583984 L145.672363,15.3378906 L152.320801,15.3378906 L152.320801,40 L145.672363,40 L145.672363,40 L145.672363,40 Z M158.003418,40 L166.471191,27.6240234 L158.362793,15.3378906 L165.932129,15.3378906 L171.23291,23.1542969 L176.309082,15.3378906 L181.699707,15.3378906 L173.973145,27.4443359 L182.26123,40 L174.691895,40 L169.166504,31.8466797 L163.506348,40 L158.003418,40 L158.003418,40 L158.003418,40 Z"></path> </g> </g> </g> </svg> 
          </a>
      </div>
      <div class="search">
          <ul class="search-list" id="result">
            <!-- <li><a href="#"><strong>find</strong> - 指定目录下查找文件。</a></li> -->
          </ul>
          <input type="text" class="query" id="query" autocomplete="off" autofocus="autofocus" placeholder="Linux 命令搜索"/>
          <div class="enter-input">
              <input type="hidden" id="current_path" value="/c/ls.html">
              <button id="search_btn">搜索</button>
          </div>
      </div>
  </div>
</div>
<script type="text/javascript" src="../js/copy-to-clipboard.js"></script>

<div class="markdown-body">

<span class="edit_btn">
<a target="_blank" href="https://github.com/jaywcjlove/linux-command/edit/master/command/ls.md">纠正错误</a> 
<span class="split"></span>
<a target="_blank" href="https://github.com/jaywcjlove/linux-command/edit/master/command/ls.md">添加实例</a>
</span>


<script>const __TEMPLATE__ = document.createElement('template');
__TEMPLATE__.innerHTML = `
<style>

markdown-style h1:hover a.anchor .octicon-link:before,
markdown-style h2:hover a.anchor .octicon-link:before,
markdown-style h3:hover a.anchor .octicon-link:before,
markdown-style h4:hover a.anchor .octicon-link:before,
markdown-style h5:hover a.anchor .octicon-link:before,
markdown-style h6:hover a.anchor .octicon-link:before {
  width: 16px;
  height: 16px;
  content: ' ';
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
  mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
}
[data-color-mode*='light'], [data-color-mode*='light'] body, markdown-style[theme*='light'] { --color-prettylights-syntax-comment: #6e7781; --color-prettylights-syntax-constant: #0550ae; --color-prettylights-syntax-entity: #8250df; --color-prettylights-syntax-storage-modifier-import: #24292f; --color-prettylights-syntax-entity-tag: #116329; --color-prettylights-syntax-keyword: #cf222e; --color-prettylights-syntax-string: #0a3069; --color-prettylights-syntax-variable: #953800; --color-prettylights-syntax-brackethighlighter-unmatched: #82071e; --color-prettylights-syntax-invalid-illegal-text: #f6f8fa; --color-prettylights-syntax-invalid-illegal-bg: #82071e; --color-prettylights-syntax-carriage-return-text: #f6f8fa; --color-prettylights-syntax-carriage-return-bg: #cf222e; --color-prettylights-syntax-string-regexp: #116329; --color-prettylights-syntax-markup-list: #3b2300; --color-prettylights-syntax-markup-heading: #0550ae; --color-prettylights-syntax-markup-italic: #24292f; --color-prettylights-syntax-markup-bold: #24292f; --color-prettylights-syntax-markup-deleted-text: #82071e; --color-prettylights-syntax-markup-deleted-bg: #FFEBE9; --color-prettylights-syntax-markup-inserted-text: #116329; --color-prettylights-syntax-markup-inserted-bg: #dafbe1; --color-prettylights-syntax-markup-changed-text: #953800; --color-prettylights-syntax-markup-changed-bg: #ffd8b5; --color-prettylights-syntax-markup-ignored-text: #eaeef2; --color-prettylights-syntax-markup-ignored-bg: #0550ae; --color-prettylights-syntax-meta-diff-range: #8250df; --color-prettylights-syntax-brackethighlighter-angle: #57606a; --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f; --color-prettylights-syntax-constant-other-reference-link: #0a3069; --color-fg-default: #24292f; --color-fg-muted: #57606a; --color-fg-subtle: #6e7781; --color-canvas-default: #ffffff; --color-canvas-subtle: #f6f8fa; --color-border-default: #d0d7de; --color-border-muted: hsla(210,18%,87%,1); --color-neutral-muted: rgba(175,184,193,0.2); --color-accent-fg: #0969da; --color-accent-emphasis: #0969da; --color-attention-subtle: #fff8c5; --color-danger-fg: #cf222e; } [data-color-mode*='dark'], [data-color-mode*='dark'] body, markdown-style[theme*='dark'] { --color-prettylights-syntax-comment: #8b949e; --color-prettylights-syntax-constant: #79c0ff; --color-prettylights-syntax-entity: #d2a8ff; --color-prettylights-syntax-storage-modifier-import: #c9d1d9; --color-prettylights-syntax-entity-tag: #7ee787; --color-prettylights-syntax-keyword: #ff7b72; --color-prettylights-syntax-string: #a5d6ff; --color-prettylights-syntax-variable: #ffa657; --color-prettylights-syntax-brackethighlighter-unmatched: #f85149; --color-prettylights-syntax-invalid-illegal-text: #f0f6fc; --color-prettylights-syntax-invalid-illegal-bg: #8e1519; --color-prettylights-syntax-carriage-return-text: #f0f6fc; --color-prettylights-syntax-carriage-return-bg: #b62324; --color-prettylights-syntax-string-regexp: #7ee787; --color-prettylights-syntax-markup-list: #f2cc60; --color-prettylights-syntax-markup-heading: #1f6feb; --color-prettylights-syntax-markup-italic: #c9d1d9; --color-prettylights-syntax-markup-bold: #c9d1d9; --color-prettylights-syntax-markup-deleted-text: #ffdcd7; --color-prettylights-syntax-markup-deleted-bg: #67060c; --color-prettylights-syntax-markup-inserted-text: #aff5b4; --color-prettylights-syntax-markup-inserted-bg: #033a16; --color-prettylights-syntax-markup-changed-text: #ffdfb6; --color-prettylights-syntax-markup-changed-bg: #5a1e02; --color-prettylights-syntax-markup-ignored-text: #c9d1d9; --color-prettylights-syntax-markup-ignored-bg: #1158c7; --color-prettylights-syntax-meta-diff-range: #d2a8ff; --color-prettylights-syntax-brackethighlighter-angle: #8b949e; --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58; --color-prettylights-syntax-constant-other-reference-link: #a5d6ff; --color-fg-default: #c9d1d9; --color-fg-muted: #8b949e; --color-fg-subtle: #484f58; --color-canvas-default: #0d1117; --color-canvas-subtle: #161b22; --color-border-default: #30363d; --color-border-muted: #21262d; --color-neutral-muted: rgba(110,118,129,0.4); --color-accent-fg: #58a6ff; --color-accent-emphasis: #1f6feb; --color-attention-subtle: rgba(187,128,9,0.15); --color-danger-fg: #f85149; } markdown-style { display: block; -webkit-text-size-adjust: 100%; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; font-size: 16px; line-height: 1.5; word-wrap: break-word; color: var(--color-fg-default); background-color: var(--color-canvas-default); } markdown-style details, markdown-style figcaption, markdown-style figure { display: block; } markdown-style summary { display: list-item; } markdown-style [hidden] { display: none !important; } markdown-style a { background-color: transparent; color: var(--color-accent-fg); text-decoration: none; } markdown-style a:active, markdown-style a:hover { outline-width: 0; } markdown-style abbr[title] { border-bottom: none; text-decoration: underline dotted; } markdown-style b, markdown-style strong { font-weight: 600; } markdown-style dfn { font-style: italic; } markdown-style h1 { margin: .67em 0; font-weight: 600; padding-bottom: .3em; font-size: 2em; border-bottom: 1px solid var(--color-border-muted); } markdown-style mark { background-color: var(--color-attention-subtle); color: var(--color-text-primary); } markdown-style small { font-size: 90%; } markdown-style sub, markdown-style sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } markdown-style sub { bottom: -0.25em; } markdown-style sup { top: -0.5em; } markdown-style img { border-style: none; max-width: 100%; box-sizing: content-box; background-color: var(--color-canvas-default); } markdown-style code, markdown-style kbd, markdown-style pre, markdown-style samp { font-family: monospace,monospace; font-size: 1em; } markdown-style figure { margin: 1em 40px; } markdown-style hr { box-sizing: content-box; overflow: hidden; background: transparent; border-bottom: 1px solid var(--color-border-muted); height: .25em; padding: 0; margin: 24px 0; background-color: var(--color-border-default); border: 0; } markdown-style input { font: inherit; margin: 0; overflow: visible; font-family: inherit; font-size: inherit; line-height: inherit; } markdown-style [type=button], markdown-style [type=reset], markdown-style [type=submit] { -webkit-appearance: button; } markdown-style [type=button]::-moz-focus-inner, markdown-style [type=reset]::-moz-focus-inner, markdown-style [type=submit]::-moz-focus-inner { border-style: none; padding: 0; } markdown-style [type=button]:-moz-focusring, markdown-style [type=reset]:-moz-focusring, markdown-style [type=submit]:-moz-focusring { outline: 1px dotted ButtonText; } markdown-style [type=checkbox], markdown-style [type=radio] { box-sizing: border-box; padding: 0; } markdown-style [type=number]::-webkit-inner-spin-button, markdown-style [type=number]::-webkit-outer-spin-button { height: auto; } markdown-style [type=search] { -webkit-appearance: textfield; outline-offset: -2px; } markdown-style [type=search]::-webkit-search-cancel-button, markdown-style [type=search]::-webkit-search-decoration { -webkit-appearance: none; } markdown-style ::-webkit-input-placeholder { color: inherit; opacity: .54; } markdown-style ::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; } markdown-style a:hover { text-decoration: underline; } markdown-style hr::before { display: table; content: ""; } markdown-style hr::after { display: table; clear: both; content: ""; } markdown-style table { border-spacing: 0; border-collapse: collapse; display: block; width: max-content; max-width: 100%; overflow: auto; } markdown-style td, markdown-style th { padding: 0; } markdown-style details summary { cursor: pointer; } markdown-style details:not([open])>*:not(summary) { display: none !important; } markdown-style kbd { display: inline-block; padding: 3px 5px; font: 11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; line-height: 10px; color: var(--color-fg-default); vertical-align: middle; background-color: var(--color-canvas-subtle); border: solid 1px var(--color-neutral-muted); border-bottom-color: var(--color-neutral-muted); border-radius: 6px; box-shadow: inset 0 -1px 0 var(--color-neutral-muted); } markdown-style h1, markdown-style h2, markdown-style h3, markdown-style h4, markdown-style h5, markdown-style h6 { margin-top: 24px; margin-bottom: 16px; font-weight: 600; line-height: 1.25; } markdown-style h2 { font-weight: 600; padding-bottom: .3em; font-size: 1.5em; border-bottom: 1px solid var(--color-border-muted); } markdown-style h3 { font-weight: 600; font-size: 1.25em; } markdown-style h4 { font-weight: 600; font-size: 1em; } markdown-style h5 { font-weight: 600; font-size: .875em; } markdown-style h6 { font-weight: 600; font-size: .85em; color: var(--color-fg-muted); } markdown-style p { margin-top: 0; margin-bottom: 10px; } markdown-style blockquote { margin: 0; padding: 0 1em; color: var(--color-fg-muted); border-left: .25em solid var(--color-border-default); } markdown-style ul, markdown-style ol { margin-top: 0; margin-bottom: 0; padding-left: 2em; } markdown-style ol ol, markdown-style ul ol { list-style-type: lower-roman; } markdown-style ul ul ol, markdown-style ul ol ol, markdown-style ol ul ol, markdown-style ol ol ol { list-style-type: lower-alpha; } markdown-style dd { margin-left: 0; } markdown-style tt, markdown-style code { font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; font-size: 12px; } markdown-style pre { margin-top: 0; margin-bottom: 0; font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; font-size: 12px; word-wrap: normal; } markdown-style .octicon { display: inline-block; overflow: visible !important; vertical-align: text-bottom; fill: currentColor; } markdown-style ::placeholder { color: var(--color-fg-subtle); opacity: 1; } markdown-style input::-webkit-outer-spin-button, markdown-style input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; appearance: none; }
markdown-style .token.comment, markdown-style .token.prolog, markdown-style .token.doctype, markdown-style .token.cdata { color: var(--color-prettylights-syntax-comment); } markdown-style .token.namespace { opacity: 0.7; } markdown-style .token.tag, markdown-style .token.selector, markdown-style .token.constant, markdown-style .token.symbol, markdown-style .token.deleted { color: var(--color-prettylights-syntax-entity-tag); } markdown-style .token.maybe-class-name { color: var(--color-prettylights-syntax-variable); } markdown-style .token.property-access, markdown-style .token.operator, markdown-style .token.boolean, markdown-style .token.number, markdown-style .token.selector markdown-style .token.class, markdown-style .token.attr-name, markdown-style .token.string, markdown-style .token.char, markdown-style .token.builtin { color: var(--color-prettylights-syntax-constant); } markdown-style .token.deleted { color: var(--color-prettylights-syntax-markup-deleted-text); } markdown-style .token.property { color: var(--color-prettylights-syntax-constant); } markdown-style .token.punctuation { color: var(--color-prettylights-syntax-markup-bold); } markdown-style .token.function { color: var(--color-prettylights-syntax-entity); } markdown-style .code-line .token.deleted { background-color: var(--color-prettylights-syntax-markup-deleted-bg); } markdown-style .token.inserted { color: var(--color-prettylights-syntax-markup-inserted-text); } markdown-style .code-line .token.inserted { background-color: var(--color-prettylights-syntax-markup-inserted-bg); } markdown-style .token.variable { color: var(--color-prettylights-syntax-constant); } markdown-style .token.entity, markdown-style .token.url, .language-css markdown-style .token.string, .style markdown-style .token.string { color: var(--color-prettylights-syntax-string); } markdown-style .token.color, markdown-style .token.atrule, markdown-style .token.attr-value, markdown-style .token.function, markdown-style .token.class-name { color: var(--color-prettylights-syntax-string); } markdown-style .token.rule, markdown-style .token.regex, markdown-style .token.important, markdown-style .token.keyword { color: var(--color-prettylights-syntax-keyword); } markdown-style .token.coord { color: var(--color-prettylights-syntax-meta-diff-range); } markdown-style .token.important, markdown-style .token.bold { font-weight: bold; } markdown-style .token.italic { font-style: italic; } markdown-style .token.entity { cursor: help; }
markdown-style [data-catalyst] { display: block; } markdown-style g-emoji { font-family: "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"; font-size: 1em; font-style: normal !important; font-weight: 400; line-height: 1; vertical-align: -0.075em; } markdown-style g-emoji img { width: 1em; height: 1em; } markdown-style::before { display: table; content: ""; } markdown-style::after { display: table; clear: both; content: ""; } markdown-style>*:first-child { margin-top: 0 !important; } markdown-style>*:last-child { margin-bottom: 0 !important; } markdown-style a:not([href]) { color: inherit; text-decoration: none; } markdown-style .absent { color: var(--color-danger-fg); } markdown-style a.anchor { float: left; padding-right: 4px; margin-left: -20px; line-height: 1; } markdown-style a.anchor:focus { outline: none; } markdown-style p, markdown-style blockquote, markdown-style ul, markdown-style ol, markdown-style dl, markdown-style table, markdown-style pre, markdown-style details { margin-top: 0; margin-bottom: 16px; } markdown-style blockquote>:first-child { margin-top: 0; } markdown-style blockquote>:last-child { margin-bottom: 0; } markdown-style sup>a::before { content: "["; } markdown-style sup>a::after { content: "]"; }
markdown-style .octicon-video { border: 1px solid #d0d7de !important; border-radius: 6px !important; display: block; } markdown-style .octicon-video summary { border-bottom: 1px solid #d0d7de !important; padding: 8px 16px !important; cursor: pointer; } markdown-style .octicon-video > video { display: block !important; max-width: 100% !important; padding: 2px; box-sizing: border-box; border-bottom-right-radius: 6px !important; border-bottom-left-radius: 6px !important; } markdown-style details.octicon-video:not([open])>*:not(summary) { display: none !important; } markdown-style details.octicon-video:not([open]) > summary { border-bottom: 0 !important; } markdown-style h1 .octicon-link, markdown-style h2 .octicon-link, markdown-style h3 .octicon-link, markdown-style h4 .octicon-link, markdown-style h5 .octicon-link, markdown-style h6 .octicon-link { color: var(--color-fg-default); vertical-align: middle; visibility: hidden; } markdown-style h1:hover .anchor, markdown-style h2:hover .anchor, markdown-style h3:hover .anchor, markdown-style h4:hover .anchor, markdown-style h5:hover .anchor, markdown-style h6:hover .anchor { text-decoration: none; } markdown-style h1:hover .anchor .octicon-link, markdown-style h2:hover .anchor .octicon-link, markdown-style h3:hover .anchor .octicon-link, markdown-style h4:hover .anchor .octicon-link, markdown-style h5:hover .anchor .octicon-link, markdown-style h6:hover .anchor .octicon-link { visibility: visible; } markdown-style h1 tt, markdown-style h1 code, markdown-style h2 tt, markdown-style h2 code, markdown-style h3 tt, markdown-style h3 code, markdown-style h4 tt, markdown-style h4 code, markdown-style h5 tt, markdown-style h5 code, markdown-style h6 tt, markdown-style h6 code { padding: 0 .2em; font-size: inherit; } markdown-style ul.no-list, markdown-style ol.no-list { padding: 0; list-style-type: none; } markdown-style ol[type="1"] { list-style-type: decimal; } markdown-style ol[type=a] { list-style-type: lower-alpha; } markdown-style ol[type=i] { list-style-type: lower-roman; } markdown-style div>ol:not([type]) { list-style-type: decimal; } markdown-style ul ul, markdown-style ul ol, markdown-style ol ol, markdown-style ol ul { margin-top: 0; margin-bottom: 0; } markdown-style li>p { margin-top: 16px; } markdown-style li+li { margin-top: .25em; } markdown-style dl { padding: 0; } markdown-style dl dt { padding: 0; margin-top: 16px; font-size: 1em; font-style: italic; font-weight: 600; } markdown-style dl dd { padding: 0 16px; margin-bottom: 16px; } markdown-style table th { font-weight: 600; } markdown-style table th, markdown-style table td { padding: 6px 13px; border: 1px solid var(--color-border-default); } markdown-style table tr { background-color: var(--color-canvas-default); border-top: 1px solid var(--color-border-muted); } markdown-style table tr:nth-child(2n) { background-color: var(--color-canvas-subtle); } markdown-style table img { background-color: transparent; vertical-align: middle; } markdown-style img[align=right] { padding-left: 20px; } markdown-style img[align=left] { padding-right: 20px; } markdown-style .emoji { max-width: none; vertical-align: text-top; background-color: transparent; } markdown-style span.frame { display: block; overflow: hidden; } markdown-style span.frame>span { display: block; float: left; width: auto; padding: 7px; margin: 13px 0 0; overflow: hidden; border: 1px solid var(--color-border-default); } markdown-style span.frame span img { display: block; float: left; } markdown-style span.frame span span { display: block; padding: 5px 0 0; clear: both; color: var(--color-fg-default); } markdown-style span.align-center { display: block; overflow: hidden; clear: both; } markdown-style span.align-center>span { display: block; margin: 13px auto 0; overflow: hidden; text-align: center; } markdown-style span.align-center span img { margin: 0 auto; text-align: center; } markdown-style span.align-right { display: block; overflow: hidden; clear: both; } markdown-style span.align-right>span { display: block; margin: 13px 0 0; overflow: hidden; text-align: right; } markdown-style span.align-right span img { margin: 0; text-align: right; } markdown-style span.float-left { display: block; float: left; margin-right: 13px; overflow: hidden; } markdown-style span.float-left span { margin: 13px 0 0; } markdown-style span.float-right { display: block; float: right; margin-left: 13px; overflow: hidden; } markdown-style span.float-right>span { display: block; margin: 13px auto 0; overflow: hidden; text-align: right; } markdown-style code, markdown-style tt { padding: .2em .4em; margin: 0; font-size: 85%; background-color: var(--color-neutral-muted); border-radius: 6px; } markdown-style code br, markdown-style tt br { display: none; } markdown-style del code { text-decoration: inherit; } markdown-style pre code { font-size: 100%; } markdown-style pre>code { padding: 0; margin: 0; word-break: normal; white-space: pre; background: transparent; border: 0; } markdown-style pre { position: relative; font-size: 85%; line-height: 1.45; background-color: var(--color-canvas-subtle); border-radius: 6px; } markdown-style pre code, markdown-style pre tt { display: inline; max-width: auto; padding: 0; margin: 0; overflow: visible; line-height: inherit; word-wrap: normal; background-color: transparent; border: 0; } markdown-style pre > code { padding: 16px; overflow: auto; display: block; } markdown-style .csv-data td, markdown-style .csv-data th { padding: 5px; overflow: hidden; font-size: 12px; line-height: 1; text-align: left; white-space: nowrap; } markdown-style .csv-data .blob-num { padding: 10px 8px 9px; text-align: right; background: var(--color-canvas-default); border: 0; } markdown-style .csv-data tr { border-top: 0; } markdown-style .csv-data th { font-weight: 600; background: var(--color-canvas-subtle); border-top: 0; } markdown-style .footnotes { font-size: 12px; color: var(--color-fg-muted); border-top: 1px solid var(--color-border-default); } markdown-style .footnotes ol { padding-left: 16px; } markdown-style .footnotes li { position: relative; } markdown-style .footnotes li:target::before { position: absolute; top: -8px; right: -8px; bottom: -8px; left: -24px; pointer-events: none; content: ""; border: 2px solid var(--color-accent-emphasis); border-radius: 6px; } markdown-style .footnotes li:target { color: var(--color-fg-default); } markdown-style .footnotes .data-footnote-backref g-emoji { font-family: monospace; } markdown-style .task-list-item { list-style-type: none; } markdown-style .task-list-item label { font-weight: 400; } markdown-style .task-list-item.enabled label { cursor: pointer; } markdown-style .task-list-item+.task-list-item { margin-top: 3px; } markdown-style .task-list-item .handle { display: none; } markdown-style .task-list-item-checkbox, markdown-style input[type="checkbox"] { margin: 0 .2em .25em -1.6em; vertical-align: middle; } markdown-style .contains-task-list:dir(rtl) .task-list-item-checkbox, markdown-style .contains-task-list:dir(rtl) input[type="checkbox"] { margin: 0 -1.6em .25em .2em; } markdown-style ::-webkit-calendar-picker-indicator { filter: invert(50%); }
</style>
<slot></slot>
`;
class MarkdownStyle extends HTMLElement {
    constructor() {
        super();
        this.shadow = this.attachShadow({ mode: 'open' });
        this.shadow.appendChild(__TEMPLATE__.content.cloneNode(true));
        const style = Array.prototype.slice
            .call(this.shadow.children)
            .find((item) => item.tagName === 'STYLE');
        if (style) {
            const id = '__MARKDOWN_STYLE__';
            const findStyle = document.getElementById(id);
            if (!findStyle) {
                style.id = id;
                document.head.append(style);
            }
        }
    }
    get theme() {
        const value = this.getAttribute('theme');
        return value === null ? '' : value;
    }
    set theme(name) {
        this.setAttribute('theme', name);
    }
    connectedCallback() {
        if (!this.theme) {
            const { colorMode } = document.documentElement.dataset;
            this.theme = colorMode;
            const observer = new MutationObserver((mutationsList, observer) => {
                this.theme = document.documentElement.dataset.colorMode;
            });
            observer.observe(document.documentElement, { attributes: true });
            window.matchMedia('(prefers-color-scheme: light)').onchange = (event) => {
                this.theme = event.matches ? 'light' : 'dark';
            };
            window.matchMedia('(prefers-color-scheme: dark)').onchange = (event) => {
                this.theme = event.matches ? 'dark' : 'light';
            };
        }
    }
}
customElements.define('markdown-style', MarkdownStyle);</script><markdown-style style="max-width: 960px; margin: 0 auto 60px auto; padding: 8px" class="markdown-style">
<h1 id="ls"><a class="anchor" aria-hidden="true" tabindex="-1" href="#ls"><span class="octicon octicon-link"></span></a>ls</h1>
<p>显示目录内容列表</p>
<h2 id="补充说明"><a class="anchor" aria-hidden="true" tabindex="-1" href="#补充说明"><span class="octicon octicon-link"></span></a>补充说明</h2>
<p><strong>ls命令</strong> 就是list的缩写，用来显示目标列表，在Linux中是使用率较高的命令。ls命令的输出信息可以进行彩色加亮显示，以分区不同类型的文件。</p>
<h3 id="语法"><a class="anchor" aria-hidden="true" tabindex="-1" href="#语法"><span class="octicon octicon-link"></span></a>语法</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">ls</span> <span class="token punctuation">[</span>选项<span class="token punctuation">]</span> <span class="token punctuation">[</span>文件名<span class="token punctuation">..</span>.<span class="token punctuation">]</span>
</span><span class="code-line line-number" line="2">   <span class="token punctuation">[</span>-1abcdfgiklmnopqrstuxABCDFGLNQRSUX<span class="token punctuation">]</span> <span class="token punctuation">[</span>-w cols<span class="token punctuation">]</span> <span class="token punctuation">[</span>-T cols<span class="token punctuation">]</span> <span class="token punctuation">[</span>-I pattern<span class="token punctuation">]</span> <span class="token punctuation">[</span>--full-time<span class="token punctuation">]</span> 
</span><span class="code-line line-number" line="3">   <span class="token punctuation">[</span>--format<span class="token operator">=</span><span class="token punctuation">{</span>long,verbose,commas,across,vertical,single-col‐umn<span class="token punctuation">}</span><span class="token punctuation">]</span> 
</span><span class="code-line line-number" line="4">   <span class="token punctuation">[</span>--sort<span class="token operator">=</span><span class="token punctuation">{</span>none,time,size,extension<span class="token punctuation">}</span><span class="token punctuation">]</span> <span class="token punctuation">[</span>--time<span class="token operator">=</span><span class="token punctuation">{</span>atime,access,use,ctime,status<span class="token punctuation">}</span><span class="token punctuation">]</span> 
</span><span class="code-line line-number" line="5">   <span class="token punctuation">[</span>--color<span class="token punctuation">[</span><span class="token operator">=</span><span class="token punctuation">{</span>none,auto,always<span class="token punctuation">}</span><span class="token punctuation">]</span><span class="token punctuation">]</span> <span class="token punctuation">[</span>--help<span class="token punctuation">]</span> <span class="token punctuation">[</span>--version<span class="token punctuation">]</span> <span class="token punctuation">[</span>--<span class="token punctuation">]</span>
</span></code><div onclick="copied(this)" data-code="ls [选项] [文件名...]
   [-1abcdfgiklmnopqrstuxABCDFGLNQRSUX] [-w cols] [-T cols] [-I pattern] [--full-time] 
   [--format={long,verbose,commas,across,vertical,single-col‐umn}] 
   [--sort={none,time,size,extension}] [--time={atime,access,use,ctime,status}] 
   [--color[={none,auto,always}]] [--help] [--version] [--]
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="选项"><a class="anchor" aria-hidden="true" tabindex="-1" href="#选项"><span class="octicon octicon-link"></span></a>选项</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token parameter variable">-C</span>     <span class="token comment"># 多列输出，纵向排序。</span>
</span><span class="code-line line-number" line="2"><span class="token parameter variable">-F</span>     <span class="token comment"># 每个目录名加 "/" 后缀，每个 FIFO 名加 "|" 后缀， 每个可运行名加“ * ”后缀。</span>
</span><span class="code-line line-number" line="3"><span class="token parameter variable">-R</span>     <span class="token comment"># 递归列出遇到的子目录。</span>
</span><span class="code-line line-number" line="4"><span class="token parameter variable">-a</span>     <span class="token comment"># 列出所有文件，包括以 "." 开头的隐含文件。</span>
</span><span class="code-line line-number" line="5"><span class="token parameter variable">-c</span>     <span class="token comment"># 使用“状态改变时间”代替“文件修改时间”为依据来排序（使用“-t”选项时）或列出（使用“-l”选项时）。</span>
</span><span class="code-line line-number" line="6"><span class="token parameter variable">-d</span>     <span class="token comment"># 将目录名像其它文件一样列出，而不是列出它们的内容。</span>
</span><span class="code-line line-number" line="7"><span class="token parameter variable">-i</span>     <span class="token comment"># 输出文件前先输出文件系列号（即 i 节点号: i-node number）。 -l  列出（以单列格式）文件模式</span>
</span><span class="code-line line-number" line="8">       <span class="token comment"># （file mode），文件的链接数，所有者名，组名，文件大小（以字节为单位），时间信息，及文件名。</span>
</span><span class="code-line line-number" line="9">       <span class="token comment"># 缺省时，时间信息显示最近修改时间；可以以选项“-c”和“-u”选择显示其它两种时间信息。对于设备文件，</span>
</span><span class="code-line line-number" line="10">       <span class="token comment"># 原先显示文件大小的区域通常显示的是主要和次要的信号（majorand minor device numbers）。</span>
</span><span class="code-line line-number" line="11"><span class="token parameter variable">-q</span>     <span class="token comment"># 将文件名中的非打印字符输出为问号。（对于到终端的输出这是缺省的。）</span>
</span><span class="code-line line-number" line="12"><span class="token parameter variable">-r</span>     <span class="token comment"># 逆序排列。</span>
</span><span class="code-line line-number" line="13"><span class="token parameter variable">-t</span>     <span class="token comment"># 按时间信息排序。</span>
</span><span class="code-line line-number" line="14"><span class="token parameter variable">-u</span>     <span class="token comment"># 使用最近访问时间代替最近修改时间为依据来排序（使用“-t”选项时）或列出（使用“-l”选项时）。</span>
</span><span class="code-line line-number" line="15"><span class="token parameter variable">-1</span>     <span class="token comment"># 单列输出。</span>
</span><span class="code-line line-number" line="16">-1, <span class="token parameter variable">--format</span><span class="token operator">=</span>single-column  <span class="token comment"># 一行输出一个文件（单列输出）。如标准输出不是到终端，此选项就是缺省选项。</span>
</span><span class="code-line line-number" line="17">-a, <span class="token parameter variable">--all</span> <span class="token comment"># 列出目录中所有文件，包括以“.”开头的文件。</span>
</span><span class="code-line line-number" line="18">-b, <span class="token parameter variable">--escape</span> <span class="token comment"># 把文件名中不可输出的字符用反斜杠加字符编号(就像在 C 语言里一样)的形式列出。</span>
</span><span class="code-line line-number" line="19">-c, <span class="token parameter variable">--time</span><span class="token operator">=</span>ctime, <span class="token parameter variable">--time</span><span class="token operator">=</span>status
</span><span class="code-line line-number" line="20">      <span class="token comment"># 按文件状态改变时间（i节点中的ctime）排序并输出目录内</span>
</span><span class="code-line line-number" line="21">      <span class="token comment"># 容。如采用长格式输出（选项“-l”），使用文件的状态改</span>
</span><span class="code-line line-number" line="22">      <span class="token comment"># 变时间取代文件修改时间。【译注：所谓文件状态改变（i节</span>
</span><span class="code-line line-number" line="23">      <span class="token comment"># 点中以ctime标志），既包括文件被修改，又包括文件属性（ 如所有者、组、链接数等等）的变化】</span>
</span><span class="code-line line-number" line="24">-d, <span class="token parameter variable">--directory</span>
</span><span class="code-line line-number" line="25">      <span class="token comment"># 将目录名像其它文件一样列出，而不是列出它们的内容。</span>
</span><span class="code-line line-number" line="26"><span class="token parameter variable">-f</span>    <span class="token comment"># 不排序目录内容；按它们在磁盘上存储的顺序列出。同时启 动“ -a ”选项，如果在“ -f ”之前存在“ -l”、</span>
</span><span class="code-line line-number" line="27">      <span class="token comment"># “ - -color ”或“ -s ”，则禁止它们。</span>
</span><span class="code-line line-number" line="28"><span class="token parameter variable">-g</span>    <span class="token comment"># 忽略，为兼容UNIX用。</span>
</span><span class="code-line line-number" line="29">-i, <span class="token parameter variable">--inode</span>
</span><span class="code-line line-number" line="30">      <span class="token comment"># 在每个文件左边打印  i  节点号（也叫文件序列号和索引号:  file  serial  number and index num‐</span>
</span><span class="code-line line-number" line="31">      <span class="token comment"># ber）。i节点号在每个特定的文件系统中是唯一的。</span>
</span><span class="code-line line-number" line="32">-k, <span class="token parameter variable">--kilobytes</span>
</span><span class="code-line line-number" line="33">      <span class="token comment"># 如列出文件大小，则以千字节KB为单位。</span>
</span><span class="code-line line-number" line="34">-l, <span class="token parameter variable">--format</span><span class="token operator">=</span>long, <span class="token parameter variable">--format</span><span class="token operator">=</span>verbose
</span><span class="code-line line-number" line="35">      <span class="token comment"># 输出的信息从左到右依次包括文件名、文件类型、权限、硬链接数、所有者名、组名、大小（byte）</span>
</span><span class="code-line line-number" line="36">      <span class="token comment"># 、及时间信息（如未指明是其它时间即指修改时间）。对于6个月以上的文件或超出未来</span>
</span><span class="code-line line-number" line="37">      <span class="token comment"># 1小时的文件，时间信息中的时分将被年代取代。</span>
</span><span class="code-line line-number" line="38">      <span class="token comment"># 每个目录列出前，有一行“总块数”显示目录下全部文件所占的磁盘空间。块默认是1024字节；</span>
</span><span class="code-line line-number" line="39">      <span class="token comment"># 如果设置了 POSIXLY_CORRECT 的环境变量，除非用“-k”选项，则默认块大小是 512 字节。</span>
</span><span class="code-line line-number" line="40">      <span class="token comment"># 每一个硬链接都计入总块数（因此可能重复计数），这无 疑是个缺点。</span>
</span><span class="code-line line-number" line="41">
</span><span class="code-line line-number" line="42"><span class="token comment"># 列出的权限类似于以符号表示（文件）模式的规范。但是 ls</span>
</span><span class="code-line line-number" line="43">      <span class="token comment"># 在每套权限的第三个字符中结合了多位（ multiple bits ） 的信息，如下： s 如果设置了  setuid</span>
</span><span class="code-line line-number" line="44">      <span class="token comment"># 位或 setgid   位，而且也设置了相应的可执行位。 S 如果设置了 setuid 位或 setgid</span>
</span><span class="code-line line-number" line="45">      <span class="token comment"># 位，但是没有设置相应的可执行位。 t 如果设置了  sticky  位，而且也设置了相应的可执行位。  T</span>
</span><span class="code-line line-number" line="46">      <span class="token comment"># 如果设置了 sticky 位，但是没有设置相应的可执行位。              x</span>
</span><span class="code-line line-number" line="47">      <span class="token comment"># 如果仅仅设置了可执行位而非以上四种情况。 - 其它情况（即可执行位未设置）。</span>
</span><span class="code-line line-number" line="48">-m, <span class="token parameter variable">--format</span><span class="token operator">=</span>commas
</span><span class="code-line line-number" line="49">      <span class="token comment"># 水平列出文件，每行尽可能多，相互用逗号和一个空格分隔。</span>
</span><span class="code-line line-number" line="50">-n, --numeric-uid-gid
</span><span class="code-line line-number" line="51">      <span class="token comment"># 列出数字化的 UID 和 GID 而不是用户名和组名。</span>
</span><span class="code-line line-number" line="52"><span class="token parameter variable">-o</span>    <span class="token comment">#  以长格式列出目录内容，但是不显示组信息。等于使用“         --format=long          --no-group</span>
</span><span class="code-line line-number" line="53">      <span class="token comment"># ”选项。提供此选项是为了与其它版本的 ls 兼容。</span>
</span><span class="code-line line-number" line="54"><span class="token parameter variable">-p</span>    <span class="token comment">#  在每个文件名后附上一个字符以说明该文件的类型。类似“ -F ”选项但是不 标示可执行文件。</span>
</span><span class="code-line line-number" line="55">-q, --hide-control-chars
</span><span class="code-line line-number" line="56">      <span class="token comment"># 用问号代替文件名中非打印的字符。这是缺省选项。</span>
</span><span class="code-line line-number" line="57">-r, <span class="token parameter variable">--reverse</span>
</span><span class="code-line line-number" line="58">      <span class="token comment"># 逆序排列目录内容。</span>
</span><span class="code-line line-number" line="59">-s, <span class="token parameter variable">--size</span>
</span><span class="code-line line-number" line="60">      <span class="token comment"># 在每个文件名左侧输出该文件的大小，以    1024   字节的块为单位。如果设置了   POSIXLY_CORRECT</span>
</span><span class="code-line line-number" line="61">      <span class="token comment"># 的环境变量，除非用“ -k ”选项，块大小是 512 字节。</span>
</span><span class="code-line line-number" line="62">-t, <span class="token parameter variable">--sort</span><span class="token operator">=</span>time
</span><span class="code-line line-number" line="63">      <span class="token comment"># 按文件最近修改时间（ i 节点中的 mtime ）而不是按文件名字典序排序，新文件 靠前。</span>
</span><span class="code-line line-number" line="64">-u, <span class="token parameter variable">--time</span><span class="token operator">=</span>atime, <span class="token parameter variable">--time</span><span class="token operator">=</span>access, <span class="token parameter variable">--time</span><span class="token operator">=</span>use
</span><span class="code-line line-number" line="65">      <span class="token comment"># 类似选项“    -t    ”，但是用文件最近访问时间（    i     节点中的     atime     ）取代文件修</span>
</span><span class="code-line line-number" line="66">      <span class="token comment"># 改时间。如果使用长格式列出，打印的时间是最近访问时间。</span>
</span><span class="code-line line-number" line="67">-w, <span class="token parameter variable">--width</span> cols
</span><span class="code-line line-number" line="68">       <span class="token comment"># 假定屏幕宽度是      cols      （      cols     以实际数字取代）列。如未用此选项，缺省值是这</span>
</span><span class="code-line line-number" line="69">       <span class="token comment"># 样获得的：如可能先尝试取自终端驱动，否则尝试取自环境变量          COLUMNS          （如果设</span>
</span><span class="code-line line-number" line="70">       <span class="token comment"># 置了的话），都不行则取 80 。</span>
</span><span class="code-line line-number" line="71">
</span><span class="code-line line-number" line="72">-x, <span class="token parameter variable">--format</span><span class="token operator">=</span>across, <span class="token parameter variable">--format</span><span class="token operator">=</span>horizontal
</span><span class="code-line line-number" line="73">       <span class="token comment"># 多列输出，横向排序。</span>
</span><span class="code-line line-number" line="74">
</span><span class="code-line line-number" line="75">-A, --almost-all
</span><span class="code-line line-number" line="76">       <span class="token comment"># 显示除 "." 和 ".." 外的所有文件。</span>
</span><span class="code-line line-number" line="77">
</span><span class="code-line line-number" line="78">-B, --ignore-backups
</span><span class="code-line line-number" line="79">       <span class="token comment"># 不输出以“ ~ ”结尾的备份文件，除非已经在命令行中给出。</span>
</span><span class="code-line line-number" line="80">
</span><span class="code-line line-number" line="81">-C, <span class="token parameter variable">--format</span><span class="token operator">=</span>vertical
</span><span class="code-line line-number" line="82">       <span class="token comment"># 多列输出，纵向排序。当标准输出是终端时这是缺省项。使用命令名 dir 和 d 时， 则总是缺省的。</span>
</span><span class="code-line line-number" line="83">
</span><span class="code-line line-number" line="84">-D, <span class="token parameter variable">--dired</span>
</span><span class="code-line line-number" line="85">       <span class="token comment"># 当采用长格式（“-l”选项）输出时，在主要输出后，额外打印一行：  //DIRED//  BEG1 END1 BEG2</span>
</span><span class="code-line line-number" line="86">       <span class="token comment"># END2 ...</span>
</span><span class="code-line line-number" line="87">
</span><span class="code-line line-number" line="88"><span class="token comment"># BEGn 和 ENDn 是无符号整数，记录每个文件名的起始、结束位置在输出中的位置（</span>
</span><span class="code-line line-number" line="89"><span class="token comment">#        字节偏移量）。这使得          Emacs          易于找到文件名，即使文件名包含空格或换行等非正</span>
</span><span class="code-line line-number" line="90"><span class="token comment">#        常字符也无需特异的搜索。</span>
</span><span class="code-line line-number" line="91"><span class="token comment"># </span>
</span><span class="code-line line-number" line="92"><span class="token comment"># 如果目录是递归列出的（“ -R ”选项），每个子目录后列出类似一行：</span>
</span><span class="code-line line-number" line="93">       <span class="token comment"># //SUBDIRED//  BEG1 END1 ...  【译注：我测试了 TurboLinux4.0 和 RedHat6.1 ，发现它们都是在 “</span>
</span><span class="code-line line-number" line="94">       <span class="token comment"># //DIRED//     BEG1...     ”之后列出“     //SUBDIRED//     BEG1     ...      ”，也即只有一个</span>
</span><span class="code-line line-number" line="95">       <span class="token comment"># 而不是在每个子目录后都有。而且“ //SUBDIRED// BEG1 ... ”列出的是各个子目 录名的偏移。】</span>
</span><span class="code-line line-number" line="96">
</span><span class="code-line line-number" line="97">-F, --classify, --file-type
</span><span class="code-line line-number" line="98">       <span class="token comment"># 在每个文件名后附上一个字符以说明该文件的类型。“  * ”表示普通的可执行文件； “ / ”表示目录；“</span>
</span><span class="code-line line-number" line="99">       <span class="token comment"># @ ”表示符号链接；“ | ”表示FIFOs；“ = ”表示套接字 (sockets) ；什么也没有则表示普通文件。</span>
</span><span class="code-line line-number" line="100">
</span><span class="code-line line-number" line="101">-G, --no-group
</span><span class="code-line line-number" line="102">       <span class="token comment"># 以长格式列目录时不显示组信息。</span>
</span><span class="code-line line-number" line="103">
</span><span class="code-line line-number" line="104">-I, <span class="token parameter variable">--ignorepattern</span>
</span><span class="code-line line-number" line="105">       <span class="token comment"># 除非在命令行中给定，不要列出匹配shell文件名匹配式（pattern ，不是指一般</span>
</span><span class="code-line line-number" line="106">       <span class="token comment"># 表达式）的文件。在shell中，文件名以"."起始的不与在文件名匹配式(pattern)</span>
</span><span class="code-line line-number" line="107">       <span class="token comment"># 开头的通配符匹配。</span>
</span><span class="code-line line-number" line="108">
</span><span class="code-line line-number" line="109">-L, <span class="token parameter variable">--dereference</span>
</span><span class="code-line line-number" line="110">       <span class="token comment"># 列出符号链接指向的文件的信息，而不是符号链接本身。</span>
</span><span class="code-line line-number" line="111">
</span><span class="code-line line-number" line="112">-N, <span class="token parameter variable">--literal</span>
</span><span class="code-line line-number" line="113">       <span class="token comment"># 不要用引号引起文件名。</span>
</span><span class="code-line line-number" line="114">
</span><span class="code-line line-number" line="115">-Q, --quote-name
</span><span class="code-line line-number" line="116">       <span class="token comment"># 用双引号引起文件名，非打印字符以 C 语言的方法表示。</span>
</span><span class="code-line line-number" line="117">
</span><span class="code-line line-number" line="118">-R, <span class="token parameter variable">--recursive</span>
</span><span class="code-line line-number" line="119">       <span class="token comment"># 递归列出全部目录的内容。</span>
</span><span class="code-line line-number" line="120">
</span><span class="code-line line-number" line="121">-S, <span class="token parameter variable">--sort</span><span class="token operator">=</span>size
</span><span class="code-line line-number" line="122">       <span class="token comment"># 按文件大小而不是字典序排序目录内容，大文件靠前。</span>
</span><span class="code-line line-number" line="123">
</span><span class="code-line line-number" line="124">-T, <span class="token parameter variable">--tabsize</span> cols
</span><span class="code-line line-number" line="125">       <span class="token comment"># 假定每个制表符宽度是 cols 。缺省为 8。为求效率， ls 可能在输出中使用制表符。  若 cols 为</span>
</span><span class="code-line line-number" line="126">       <span class="token number">0</span>，则不使用制表符。
</span><span class="code-line line-number" line="127">
</span><span class="code-line line-number" line="128">-U, <span class="token parameter variable">--sort</span><span class="token operator">=</span>none
</span><span class="code-line line-number" line="129">       <span class="token comment"># 不排序目录内容；按它们在磁盘上存储的顺序列出。（选项“-U”和“-f”的不</span>
</span><span class="code-line line-number" line="130">       <span class="token comment"># 同是前者不启动或禁止相关的选项。）这在列很大的目录时特别有用，因为不加排序</span>
</span><span class="code-line line-number" line="131">       <span class="token comment"># 能显著地加快速度。</span>
</span><span class="code-line line-number" line="132">
</span><span class="code-line line-number" line="133">-X, <span class="token parameter variable">--sort</span><span class="token operator">=</span>extension
</span><span class="code-line line-number" line="134">       <span class="token comment"># 按文件扩展名（由最后的 "." 之后的字符组成）的字典序排序。没有扩展名的先列 出。</span>
</span><span class="code-line line-number" line="135">
</span><span class="code-line line-number" line="136">--color<span class="token punctuation">[</span><span class="token operator">=</span>when<span class="token punctuation">]</span>
</span><span class="code-line line-number" line="137">       <span class="token comment"># 指定是否使用颜色区别文件类别。环境变量  LS_COLORS  指定使用的颜色。如何设置 这个变量见 dir‐</span>
</span><span class="code-line line-number" line="138">       <span class="token comment"># colors(1) 。 when 可以被省略，或是以下几项之一：</span>
</span><span class="code-line line-number" line="139">none <span class="token comment"># 不使用颜色，这是缺省项。</span>
</span><span class="code-line line-number" line="140">       <span class="token comment"># auto 仅当标准输出是终端时使用。 always 总是使用颜色。指定 --color 而且省略 when  时就等同于</span>
</span><span class="code-line line-number" line="141">       <span class="token comment"># --color=always 。</span>
</span><span class="code-line line-number" line="142">
</span><span class="code-line line-number" line="143">--full-time
</span><span class="code-line line-number" line="144">       <span class="token comment"># 列出完整的时间，而不是使用标准的缩写。格式如同          date(1)          的缺省格式；此格式</span>
</span><span class="code-line line-number" line="145">       <span class="token comment"># 是不能改变的，但是你可以用 cut(1) 取出其中的日期字串并将结果送至命令 “ date -d ”。</span>
</span><span class="code-line line-number" line="146">
</span><span class="code-line line-number" line="147"><span class="token comment"># 输出的时间包括秒是非常有用的。（ Unix 文件系统储存文件的时间信息精确到秒，</span>
</span><span class="code-line line-number" line="148">       <span class="token comment"># 因此这个选项已经给出了系统所知的全部信息。）例如，当你有一个         Makefile          文件</span>
</span><span class="code-line line-number" line="149">       <span class="token comment"># 不能恰当地生成文件时，这个选项会提供帮助。</span>
</span></code><div onclick="copied(this)" data-code="-C     # 多列输出，纵向排序。
-F     # 每个目录名加 &#x22;/&#x22; 后缀，每个 FIFO 名加 &#x22;|&#x22; 后缀， 每个可运行名加“ * ”后缀。
-R     # 递归列出遇到的子目录。
-a     # 列出所有文件，包括以 &#x22;.&#x22; 开头的隐含文件。
-c     # 使用“状态改变时间”代替“文件修改时间”为依据来排序（使用“-t”选项时）或列出（使用“-l”选项时）。
-d     # 将目录名像其它文件一样列出，而不是列出它们的内容。
-i     # 输出文件前先输出文件系列号（即 i 节点号: i-node number）。 -l  列出（以单列格式）文件模式
       # （file mode），文件的链接数，所有者名，组名，文件大小（以字节为单位），时间信息，及文件名。
       # 缺省时，时间信息显示最近修改时间；可以以选项“-c”和“-u”选择显示其它两种时间信息。对于设备文件，
       # 原先显示文件大小的区域通常显示的是主要和次要的信号（majorand minor device numbers）。
-q     # 将文件名中的非打印字符输出为问号。（对于到终端的输出这是缺省的。）
-r     # 逆序排列。
-t     # 按时间信息排序。
-u     # 使用最近访问时间代替最近修改时间为依据来排序（使用“-t”选项时）或列出（使用“-l”选项时）。
-1     # 单列输出。
-1, --format=single-column  # 一行输出一个文件（单列输出）。如标准输出不是到终端，此选项就是缺省选项。
-a, --all # 列出目录中所有文件，包括以“.”开头的文件。
-b, --escape # 把文件名中不可输出的字符用反斜杠加字符编号(就像在 C 语言里一样)的形式列出。
-c, --time=ctime, --time=status
      # 按文件状态改变时间（i节点中的ctime）排序并输出目录内
      # 容。如采用长格式输出（选项“-l”），使用文件的状态改
      # 变时间取代文件修改时间。【译注：所谓文件状态改变（i节
      # 点中以ctime标志），既包括文件被修改，又包括文件属性（ 如所有者、组、链接数等等）的变化】
-d, --directory
      # 将目录名像其它文件一样列出，而不是列出它们的内容。
-f    # 不排序目录内容；按它们在磁盘上存储的顺序列出。同时启 动“ -a ”选项，如果在“ -f ”之前存在“ -l”、
      # “ - -color ”或“ -s ”，则禁止它们。
-g    # 忽略，为兼容UNIX用。
-i, --inode
      # 在每个文件左边打印  i  节点号（也叫文件序列号和索引号:  file  serial  number and index num‐
      # ber）。i节点号在每个特定的文件系统中是唯一的。
-k, --kilobytes
      # 如列出文件大小，则以千字节KB为单位。
-l, --format=long, --format=verbose
      # 输出的信息从左到右依次包括文件名、文件类型、权限、硬链接数、所有者名、组名、大小（byte）
      # 、及时间信息（如未指明是其它时间即指修改时间）。对于6个月以上的文件或超出未来
      # 1小时的文件，时间信息中的时分将被年代取代。
      # 每个目录列出前，有一行“总块数”显示目录下全部文件所占的磁盘空间。块默认是1024字节；
      # 如果设置了 POSIXLY_CORRECT 的环境变量，除非用“-k”选项，则默认块大小是 512 字节。
      # 每一个硬链接都计入总块数（因此可能重复计数），这无 疑是个缺点。

# 列出的权限类似于以符号表示（文件）模式的规范。但是 ls
      # 在每套权限的第三个字符中结合了多位（ multiple bits ） 的信息，如下： s 如果设置了  setuid
      # 位或 setgid   位，而且也设置了相应的可执行位。 S 如果设置了 setuid 位或 setgid
      # 位，但是没有设置相应的可执行位。 t 如果设置了  sticky  位，而且也设置了相应的可执行位。  T
      # 如果设置了 sticky 位，但是没有设置相应的可执行位。              x
      # 如果仅仅设置了可执行位而非以上四种情况。 - 其它情况（即可执行位未设置）。
-m, --format=commas
      # 水平列出文件，每行尽可能多，相互用逗号和一个空格分隔。
-n, --numeric-uid-gid
      # 列出数字化的 UID 和 GID 而不是用户名和组名。
-o    #  以长格式列出目录内容，但是不显示组信息。等于使用“         --format=long          --no-group
      # ”选项。提供此选项是为了与其它版本的 ls 兼容。
-p    #  在每个文件名后附上一个字符以说明该文件的类型。类似“ -F ”选项但是不 标示可执行文件。
-q, --hide-control-chars
      # 用问号代替文件名中非打印的字符。这是缺省选项。
-r, --reverse
      # 逆序排列目录内容。
-s, --size
      # 在每个文件名左侧输出该文件的大小，以    1024   字节的块为单位。如果设置了   POSIXLY_CORRECT
      # 的环境变量，除非用“ -k ”选项，块大小是 512 字节。
-t, --sort=time
      # 按文件最近修改时间（ i 节点中的 mtime ）而不是按文件名字典序排序，新文件 靠前。
-u, --time=atime, --time=access, --time=use
      # 类似选项“    -t    ”，但是用文件最近访问时间（    i     节点中的     atime     ）取代文件修
      # 改时间。如果使用长格式列出，打印的时间是最近访问时间。
-w, --width cols
       # 假定屏幕宽度是      cols      （      cols     以实际数字取代）列。如未用此选项，缺省值是这
       # 样获得的：如可能先尝试取自终端驱动，否则尝试取自环境变量          COLUMNS          （如果设
       # 置了的话），都不行则取 80 。

-x, --format=across, --format=horizontal
       # 多列输出，横向排序。

-A, --almost-all
       # 显示除 &#x22;.&#x22; 和 &#x22;..&#x22; 外的所有文件。

-B, --ignore-backups
       # 不输出以“ ~ ”结尾的备份文件，除非已经在命令行中给出。

-C, --format=vertical
       # 多列输出，纵向排序。当标准输出是终端时这是缺省项。使用命令名 dir 和 d 时， 则总是缺省的。

-D, --dired
       # 当采用长格式（“-l”选项）输出时，在主要输出后，额外打印一行：  //DIRED//  BEG1 END1 BEG2
       # END2 ...

# BEGn 和 ENDn 是无符号整数，记录每个文件名的起始、结束位置在输出中的位置（
#        字节偏移量）。这使得          Emacs          易于找到文件名，即使文件名包含空格或换行等非正
#        常字符也无需特异的搜索。
# 
# 如果目录是递归列出的（“ -R ”选项），每个子目录后列出类似一行：
       # //SUBDIRED//  BEG1 END1 ...  【译注：我测试了 TurboLinux4.0 和 RedHat6.1 ，发现它们都是在 “
       # //DIRED//     BEG1...     ”之后列出“     //SUBDIRED//     BEG1     ...      ”，也即只有一个
       # 而不是在每个子目录后都有。而且“ //SUBDIRED// BEG1 ... ”列出的是各个子目 录名的偏移。】

-F, --classify, --file-type
       # 在每个文件名后附上一个字符以说明该文件的类型。“  * ”表示普通的可执行文件； “ / ”表示目录；“
       # @ ”表示符号链接；“ | ”表示FIFOs；“ = ”表示套接字 (sockets) ；什么也没有则表示普通文件。

-G, --no-group
       # 以长格式列目录时不显示组信息。

-I, --ignorepattern
       # 除非在命令行中给定，不要列出匹配shell文件名匹配式（pattern ，不是指一般
       # 表达式）的文件。在shell中，文件名以&#x22;.&#x22;起始的不与在文件名匹配式(pattern)
       # 开头的通配符匹配。

-L, --dereference
       # 列出符号链接指向的文件的信息，而不是符号链接本身。

-N, --literal
       # 不要用引号引起文件名。

-Q, --quote-name
       # 用双引号引起文件名，非打印字符以 C 语言的方法表示。

-R, --recursive
       # 递归列出全部目录的内容。

-S, --sort=size
       # 按文件大小而不是字典序排序目录内容，大文件靠前。

-T, --tabsize cols
       # 假定每个制表符宽度是 cols 。缺省为 8。为求效率， ls 可能在输出中使用制表符。  若 cols 为
       0，则不使用制表符。

-U, --sort=none
       # 不排序目录内容；按它们在磁盘上存储的顺序列出。（选项“-U”和“-f”的不
       # 同是前者不启动或禁止相关的选项。）这在列很大的目录时特别有用，因为不加排序
       # 能显著地加快速度。

-X, --sort=extension
       # 按文件扩展名（由最后的 &#x22;.&#x22; 之后的字符组成）的字典序排序。没有扩展名的先列 出。

--color[=when]
       # 指定是否使用颜色区别文件类别。环境变量  LS_COLORS  指定使用的颜色。如何设置 这个变量见 dir‐
       # colors(1) 。 when 可以被省略，或是以下几项之一：
none # 不使用颜色，这是缺省项。
       # auto 仅当标准输出是终端时使用。 always 总是使用颜色。指定 --color 而且省略 when  时就等同于
       # --color=always 。

--full-time
       # 列出完整的时间，而不是使用标准的缩写。格式如同          date(1)          的缺省格式；此格式
       # 是不能改变的，但是你可以用 cut(1) 取出其中的日期字串并将结果送至命令 “ date -d ”。

# 输出的时间包括秒是非常有用的。（ Unix 文件系统储存文件的时间信息精确到秒，
       # 因此这个选项已经给出了系统所知的全部信息。）例如，当你有一个         Makefile          文件
       # 不能恰当地生成文件时，这个选项会提供帮助。
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h3 id="参数"><a class="anchor" aria-hidden="true" tabindex="-1" href="#参数"><span class="octicon octicon-link"></span></a>参数</h3>
<p>目录：指定要显示列表的目录，也可以是具体的文件。</p>
<h3 id="实例"><a class="anchor" aria-hidden="true" tabindex="-1" href="#实例"><span class="octicon octicon-link"></span></a>实例</h3>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">ls</span>       <span class="token comment"># 仅列出当前目录可见文件</span>
</span><span class="code-line line-number" line="2">$ <span class="token function">ls</span> <span class="token parameter variable">-l</span>    <span class="token comment"># 列出当前目录可见文件详细信息</span>
</span><span class="code-line line-number" line="3">$ <span class="token function">ls</span> <span class="token parameter variable">-hl</span>   <span class="token comment"># 列出详细信息并以可读大小显示文件大小</span>
</span><span class="code-line line-number" line="4">$ <span class="token function">ls</span> <span class="token parameter variable">-al</span>   <span class="token comment"># 列出所有文件（包括隐藏）的详细信息</span>
</span><span class="code-line line-number" line="5">$ <span class="token function">ls</span> --human-readable <span class="token parameter variable">--size</span> <span class="token parameter variable">-1</span> <span class="token parameter variable">-S</span> <span class="token parameter variable">--classify</span> <span class="token comment"># 按文件大小排序</span>
</span><span class="code-line line-number" line="6">$ <span class="token function">du</span> <span class="token parameter variable">-sh</span> * <span class="token operator">|</span> <span class="token function">sort</span> <span class="token parameter variable">-h</span> <span class="token comment"># 按文件大小排序(同上)</span>
</span></code><div onclick="copied(this)" data-code="$ ls       # 仅列出当前目录可见文件
$ ls -l    # 列出当前目录可见文件详细信息
$ ls -hl   # 列出详细信息并以可读大小显示文件大小
$ ls -al   # 列出所有文件（包括隐藏）的详细信息
$ ls --human-readable --size -1 -S --classify # 按文件大小排序
$ du -sh * | sort -h # 按文件大小排序(同上)
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>显示当前目录下包括隐藏文件在内的所有文件列表</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@localhost ~<span class="token punctuation">]</span><span class="token comment"># ls -a</span>
</span><span class="code-line line-number" line="2"><span class="token builtin class-name">.</span>   anaconda-ks.cfg  .bash_logout   .bashrc  install.log         .mysql_history  satools  .tcshrc   .vimrc
</span><span class="code-line line-number" line="3"><span class="token punctuation">..</span>  .bash_history    .bash_profile  .cshrc   install.log.syslog  .rnd            .ssh     .viminfo
</span></code><div onclick="copied(this)" data-code="[root@localhost ~]# ls -a
.   anaconda-ks.cfg  .bash_logout   .bashrc  install.log         .mysql_history  satools  .tcshrc   .vimrc
..  .bash_history    .bash_profile  .cshrc   install.log.syslog  .rnd            .ssh     .viminfo
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>输出长格式列表</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@localhost ~<span class="token punctuation">]</span><span class="token comment"># ls -1</span>
</span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">anaconda-ks.cfg
</span><span class="code-line line-number" line="4">install.log
</span><span class="code-line line-number" line="5">install.log.syslog
</span><span class="code-line line-number" line="6">satools
</span></code><div onclick="copied(this)" data-code="[root@localhost ~]# ls -1

anaconda-ks.cfg
install.log
install.log.syslog
satools
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>显示文件的inode信息</p>
<p>索引节点（index inode简称为“inode”）是Linux中一个特殊的概念，具有相同的索引节点号的两个文本本质上是同一个文件（除文件名不同外）。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@localhost ~<span class="token punctuation">]</span><span class="token comment"># ls -i -l anaconda-ks.cfg install.log</span>
</span><span class="code-line line-number" line="2"><span class="token number">2345481</span> -rw------- <span class="token number">1</span> root root   <span class="token number">859</span> Jun <span class="token number">11</span> <span class="token number">22</span>:49 anaconda-ks.cfg
</span><span class="code-line line-number" line="3"><span class="token number">2345474</span> -rw-r--r-- <span class="token number">1</span> root root <span class="token number">13837</span> Jun <span class="token number">11</span> <span class="token number">22</span>:49 install.log
</span></code><div onclick="copied(this)" data-code="[root@localhost ~]# ls -i -l anaconda-ks.cfg install.log
2345481 -rw------- 1 root root   859 Jun 11 22:49 anaconda-ks.cfg
2345474 -rw-r--r-- 1 root root 13837 Jun 11 22:49 install.log
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>水平输出文件列表</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@localhost /<span class="token punctuation">]</span><span class="token comment"># ls -m</span>
</span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">bin, boot, data, dev, etc, home, lib, lost+found, media, misc, mnt, opt, proc, root, sbin, selinux, srv, sys, tmp, usr, var
</span></code><div onclick="copied(this)" data-code="[root@localhost /]# ls -m

bin, boot, data, dev, etc, home, lib, lost+found, media, misc, mnt, opt, proc, root, sbin, selinux, srv, sys, tmp, usr, var
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>修改最后一次编辑的文件</p>
<p>最近修改的文件显示在最上面。</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@localhost /<span class="token punctuation">]</span><span class="token comment"># ls -t</span>
</span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">tmp  root  etc  dev  lib  boot  sys  proc  data  home  bin  sbin  usr  var  lost+found  media  mnt  opt  selinux  srv  misc
</span></code><div onclick="copied(this)" data-code="[root@localhost /]# ls -t

tmp  root  etc  dev  lib  boot  sys  proc  data  home  bin  sbin  usr  var  lost+found  media  mnt  opt  selinux  srv  misc
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>显示递归文件</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@localhost ~<span class="token punctuation">]</span><span class="token comment"># ls -R</span>
</span><span class="code-line line-number" line="2">.:
</span><span class="code-line line-number" line="3">anaconda-ks.cfg  install.log  install.log.syslog  satools
</span><span class="code-line line-number" line="4">
</span><span class="code-line line-number" line="5">./satools:
</span><span class="code-line line-number" line="6">black.txt  freemem.sh  iptables.sh  lnmp.sh  mysql  php502_check.sh  ssh_safe.sh
</span></code><div onclick="copied(this)" data-code="[root@localhost ~]# ls -R
.:
anaconda-ks.cfg  install.log  install.log.syslog  satools

./satools:
black.txt  freemem.sh  iptables.sh  lnmp.sh  mysql  php502_check.sh  ssh_safe.sh
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>打印文件的UID和GID</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@localhost /<span class="token punctuation">]</span><span class="token comment"># ls -n</span>
</span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">total <span class="token number">254</span>
</span><span class="code-line line-number" line="4">drwxr-xr-x   <span class="token number">2</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">4096</span> Jun <span class="token number">12</span> 04:03 bin
</span><span class="code-line line-number" line="5">drwxr-xr-x   <span class="token number">4</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">1024</span> Jun <span class="token number">15</span> <span class="token number">14</span>:45 boot
</span><span class="code-line line-number" line="6">drwxr-xr-x   <span class="token number">6</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">4096</span> Jun <span class="token number">12</span> <span class="token number">10</span>:26 data
</span><span class="code-line line-number" line="7">drwxr-xr-x  <span class="token number">10</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">3520</span> Sep <span class="token number">26</span> <span class="token number">15</span>:38 dev
</span><span class="code-line line-number" line="8">drwxr-xr-x  <span class="token number">75</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">4096</span> Oct <span class="token number">16</span> 04:02 etc
</span><span class="code-line line-number" line="9">drwxr-xr-x   <span class="token number">4</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">4096</span> Jun <span class="token number">12</span> <span class="token number">10</span>:26 home
</span><span class="code-line line-number" line="10">drwxr-xr-x  <span class="token number">14</span> <span class="token number">0</span> <span class="token number">0</span> <span class="token number">12288</span> Jun <span class="token number">16</span> 04:02 lib
</span><span class="code-line line-number" line="11">drwx------   <span class="token number">2</span> <span class="token number">0</span> <span class="token number">0</span> <span class="token number">16384</span> Jun <span class="token number">11</span> <span class="token number">22</span>:46 lost+found
</span><span class="code-line line-number" line="12">drwxr-xr-x   <span class="token number">2</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> media
</span><span class="code-line line-number" line="13">drwxr-xr-x   <span class="token number">2</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">4096</span> Nov  <span class="token number">8</span>  <span class="token number">2010</span> misc
</span><span class="code-line line-number" line="14">drwxr-xr-x   <span class="token number">2</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> mnt
</span><span class="code-line line-number" line="15">drwxr-xr-x   <span class="token number">2</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> opt
</span><span class="code-line line-number" line="16">dr-xr-xr-x <span class="token number">232</span> <span class="token number">0</span> <span class="token number">0</span>     <span class="token number">0</span> Jun <span class="token number">15</span> <span class="token number">11</span>:04 proc
</span><span class="code-line line-number" line="17">drwxr-x---   <span class="token number">4</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">4096</span> Oct <span class="token number">15</span> <span class="token number">14</span>:43 root
</span><span class="code-line line-number" line="18">drwxr-xr-x   <span class="token number">2</span> <span class="token number">0</span> <span class="token number">0</span> <span class="token number">12288</span> Jun <span class="token number">12</span> 04:03 sbin
</span><span class="code-line line-number" line="19">drwxr-xr-x   <span class="token number">2</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> selinux
</span><span class="code-line line-number" line="20">drwxr-xr-x   <span class="token number">2</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> srv
</span><span class="code-line line-number" line="21">drwxr-xr-x  <span class="token number">11</span> <span class="token number">0</span> <span class="token number">0</span>     <span class="token number">0</span> Jun <span class="token number">15</span> <span class="token number">11</span>:04 sys
</span><span class="code-line line-number" line="22">drwxrwxrwt   <span class="token number">3</span> <span class="token number">0</span> <span class="token number">0</span> <span class="token number">98304</span> Oct <span class="token number">16</span> 08:45 tmp
</span><span class="code-line line-number" line="23">drwxr-xr-x  <span class="token number">13</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">4096</span> Jun <span class="token number">11</span> <span class="token number">23</span>:38 usr
</span><span class="code-line line-number" line="24">drwxr-xr-x  <span class="token number">19</span> <span class="token number">0</span> <span class="token number">0</span>  <span class="token number">4096</span> Jun <span class="token number">11</span> <span class="token number">23</span>:38 var
</span></code><div onclick="copied(this)" data-code="[root@localhost /]# ls -n

total 254
drwxr-xr-x   2 0 0  4096 Jun 12 04:03 bin
drwxr-xr-x   4 0 0  1024 Jun 15 14:45 boot
drwxr-xr-x   6 0 0  4096 Jun 12 10:26 data
drwxr-xr-x  10 0 0  3520 Sep 26 15:38 dev
drwxr-xr-x  75 0 0  4096 Oct 16 04:02 etc
drwxr-xr-x   4 0 0  4096 Jun 12 10:26 home
drwxr-xr-x  14 0 0 12288 Jun 16 04:02 lib
drwx------   2 0 0 16384 Jun 11 22:46 lost+found
drwxr-xr-x   2 0 0  4096 May 11  2011 media
drwxr-xr-x   2 0 0  4096 Nov  8  2010 misc
drwxr-xr-x   2 0 0  4096 May 11  2011 mnt
drwxr-xr-x   2 0 0  4096 May 11  2011 opt
dr-xr-xr-x 232 0 0     0 Jun 15 11:04 proc
drwxr-x---   4 0 0  4096 Oct 15 14:43 root
drwxr-xr-x   2 0 0 12288 Jun 12 04:03 sbin
drwxr-xr-x   2 0 0  4096 May 11  2011 selinux
drwxr-xr-x   2 0 0  4096 May 11  2011 srv
drwxr-xr-x  11 0 0     0 Jun 15 11:04 sys
drwxrwxrwt   3 0 0 98304 Oct 16 08:45 tmp
drwxr-xr-x  13 0 0  4096 Jun 11 23:38 usr
drwxr-xr-x  19 0 0  4096 Jun 11 23:38 var
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>列出文件和文件夹的详细信息</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@localhost /<span class="token punctuation">]</span><span class="token comment"># ls -l</span>
</span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">total <span class="token number">254</span>
</span><span class="code-line line-number" line="4">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> Jun <span class="token number">12</span> 04:03 bin
</span><span class="code-line line-number" line="5">drwxr-xr-x   <span class="token number">4</span> root root  <span class="token number">1024</span> Jun <span class="token number">15</span> <span class="token number">14</span>:45 boot
</span><span class="code-line line-number" line="6">drwxr-xr-x   <span class="token number">6</span> root root  <span class="token number">4096</span> Jun <span class="token number">12</span> <span class="token number">10</span>:26 data
</span><span class="code-line line-number" line="7">drwxr-xr-x  <span class="token number">10</span> root root  <span class="token number">3520</span> Sep <span class="token number">26</span> <span class="token number">15</span>:38 dev
</span><span class="code-line line-number" line="8">drwxr-xr-x  <span class="token number">75</span> root root  <span class="token number">4096</span> Oct <span class="token number">16</span> 04:02 etc
</span><span class="code-line line-number" line="9">drwxr-xr-x   <span class="token number">4</span> root root  <span class="token number">4096</span> Jun <span class="token number">12</span> <span class="token number">10</span>:26 home
</span><span class="code-line line-number" line="10">drwxr-xr-x  <span class="token number">14</span> root root <span class="token number">12288</span> Jun <span class="token number">16</span> 04:02 lib
</span><span class="code-line line-number" line="11">drwx------   <span class="token number">2</span> root root <span class="token number">16384</span> Jun <span class="token number">11</span> <span class="token number">22</span>:46 lost+found
</span><span class="code-line line-number" line="12">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> media
</span><span class="code-line line-number" line="13">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> Nov  <span class="token number">8</span>  <span class="token number">2010</span> misc
</span><span class="code-line line-number" line="14">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> mnt
</span><span class="code-line line-number" line="15">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> opt
</span><span class="code-line line-number" line="16">dr-xr-xr-x <span class="token number">232</span> root root     <span class="token number">0</span> Jun <span class="token number">15</span> <span class="token number">11</span>:04 proc
</span><span class="code-line line-number" line="17">drwxr-x---   <span class="token number">4</span> root root  <span class="token number">4096</span> Oct <span class="token number">15</span> <span class="token number">14</span>:43 root
</span><span class="code-line line-number" line="18">drwxr-xr-x   <span class="token number">2</span> root root <span class="token number">12288</span> Jun <span class="token number">12</span> 04:03 sbin
</span><span class="code-line line-number" line="19">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> selinux
</span><span class="code-line line-number" line="20">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> srv
</span><span class="code-line line-number" line="21">drwxr-xr-x  <span class="token number">11</span> root root     <span class="token number">0</span> Jun <span class="token number">15</span> <span class="token number">11</span>:04 sys
</span><span class="code-line line-number" line="22">drwxrwxrwt   <span class="token number">3</span> root root <span class="token number">98304</span> Oct <span class="token number">16</span> 08:48 tmp
</span><span class="code-line line-number" line="23">drwxr-xr-x  <span class="token number">13</span> root root  <span class="token number">4096</span> Jun <span class="token number">11</span> <span class="token number">23</span>:38 usr
</span><span class="code-line line-number" line="24">drwxr-xr-x  <span class="token number">19</span> root root  <span class="token number">4096</span> Jun <span class="token number">11</span> <span class="token number">23</span>:38 var
</span></code><div onclick="copied(this)" data-code="[root@localhost /]# ls -l

total 254
drwxr-xr-x   2 root root  4096 Jun 12 04:03 bin
drwxr-xr-x   4 root root  1024 Jun 15 14:45 boot
drwxr-xr-x   6 root root  4096 Jun 12 10:26 data
drwxr-xr-x  10 root root  3520 Sep 26 15:38 dev
drwxr-xr-x  75 root root  4096 Oct 16 04:02 etc
drwxr-xr-x   4 root root  4096 Jun 12 10:26 home
drwxr-xr-x  14 root root 12288 Jun 16 04:02 lib
drwx------   2 root root 16384 Jun 11 22:46 lost+found
drwxr-xr-x   2 root root  4096 May 11  2011 media
drwxr-xr-x   2 root root  4096 Nov  8  2010 misc
drwxr-xr-x   2 root root  4096 May 11  2011 mnt
drwxr-xr-x   2 root root  4096 May 11  2011 opt
dr-xr-xr-x 232 root root     0 Jun 15 11:04 proc
drwxr-x---   4 root root  4096 Oct 15 14:43 root
drwxr-xr-x   2 root root 12288 Jun 12 04:03 sbin
drwxr-xr-x   2 root root  4096 May 11  2011 selinux
drwxr-xr-x   2 root root  4096 May 11  2011 srv
drwxr-xr-x  11 root root     0 Jun 15 11:04 sys
drwxrwxrwt   3 root root 98304 Oct 16 08:48 tmp
drwxr-xr-x  13 root root  4096 Jun 11 23:38 usr
drwxr-xr-x  19 root root  4096 Jun 11 23:38 var
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>列出可读文件和文件夹详细信息</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@localhost /<span class="token punctuation">]</span><span class="token comment"># ls -lh</span>
</span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">total 254K
</span><span class="code-line line-number" line="4">drwxr-xr-x   <span class="token number">2</span> root root <span class="token number">4</span>.0K Jun <span class="token number">12</span> 04:03 bin
</span><span class="code-line line-number" line="5">drwxr-xr-x   <span class="token number">4</span> root root <span class="token number">1</span>.0K Jun <span class="token number">15</span> <span class="token number">14</span>:45 boot
</span><span class="code-line line-number" line="6">drwxr-xr-x   <span class="token number">6</span> root root <span class="token number">4</span>.0K Jun <span class="token number">12</span> <span class="token number">10</span>:26 data
</span><span class="code-line line-number" line="7">drwxr-xr-x  <span class="token number">10</span> root root <span class="token number">3</span>.5K Sep <span class="token number">26</span> <span class="token number">15</span>:38 dev
</span><span class="code-line line-number" line="8">drwxr-xr-x  <span class="token number">75</span> root root <span class="token number">4</span>.0K Oct <span class="token number">16</span> 04:02 etc
</span><span class="code-line line-number" line="9">drwxr-xr-x   <span class="token number">4</span> root root <span class="token number">4</span>.0K Jun <span class="token number">12</span> <span class="token number">10</span>:26 home
</span><span class="code-line line-number" line="10">drwxr-xr-x  <span class="token number">14</span> root root  12K Jun <span class="token number">16</span> 04:02 lib
</span><span class="code-line line-number" line="11">drwx------   <span class="token number">2</span> root root  16K Jun <span class="token number">11</span> <span class="token number">22</span>:46 lost+found
</span><span class="code-line line-number" line="12">drwxr-xr-x   <span class="token number">2</span> root root <span class="token number">4</span>.0K May <span class="token number">11</span>  <span class="token number">2011</span> media
</span><span class="code-line line-number" line="13">drwxr-xr-x   <span class="token number">2</span> root root <span class="token number">4</span>.0K Nov  <span class="token number">8</span>  <span class="token number">2010</span> misc
</span><span class="code-line line-number" line="14">drwxr-xr-x   <span class="token number">2</span> root root <span class="token number">4</span>.0K May <span class="token number">11</span>  <span class="token number">2011</span> mnt
</span><span class="code-line line-number" line="15">drwxr-xr-x   <span class="token number">2</span> root root <span class="token number">4</span>.0K May <span class="token number">11</span>  <span class="token number">2011</span> opt
</span><span class="code-line line-number" line="16">dr-xr-xr-x <span class="token number">235</span> root root    <span class="token number">0</span> Jun <span class="token number">15</span> <span class="token number">11</span>:04 proc
</span><span class="code-line line-number" line="17">drwxr-x---   <span class="token number">4</span> root root <span class="token number">4</span>.0K Oct <span class="token number">15</span> <span class="token number">14</span>:43 root
</span><span class="code-line line-number" line="18">drwxr-xr-x   <span class="token number">2</span> root root  12K Jun <span class="token number">12</span> 04:03 sbin
</span><span class="code-line line-number" line="19">drwxr-xr-x   <span class="token number">2</span> root root <span class="token number">4</span>.0K May <span class="token number">11</span>  <span class="token number">2011</span> selinux
</span><span class="code-line line-number" line="20">drwxr-xr-x   <span class="token number">2</span> root root <span class="token number">4</span>.0K May <span class="token number">11</span>  <span class="token number">2011</span> srv
</span><span class="code-line line-number" line="21">drwxr-xr-x  <span class="token number">11</span> root root    <span class="token number">0</span> Jun <span class="token number">15</span> <span class="token number">11</span>:04 sys
</span><span class="code-line line-number" line="22">drwxrwxrwt   <span class="token number">3</span> root root  96K Oct <span class="token number">16</span> 08:49 tmp
</span><span class="code-line line-number" line="23">drwxr-xr-x  <span class="token number">13</span> root root <span class="token number">4</span>.0K Jun <span class="token number">11</span> <span class="token number">23</span>:38 usr
</span><span class="code-line line-number" line="24">drwxr-xr-x  <span class="token number">19</span> root root <span class="token number">4</span>.0K Jun <span class="token number">11</span> <span class="token number">23</span>:38 var
</span></code><div onclick="copied(this)" data-code="[root@localhost /]# ls -lh

total 254K
drwxr-xr-x   2 root root 4.0K Jun 12 04:03 bin
drwxr-xr-x   4 root root 1.0K Jun 15 14:45 boot
drwxr-xr-x   6 root root 4.0K Jun 12 10:26 data
drwxr-xr-x  10 root root 3.5K Sep 26 15:38 dev
drwxr-xr-x  75 root root 4.0K Oct 16 04:02 etc
drwxr-xr-x   4 root root 4.0K Jun 12 10:26 home
drwxr-xr-x  14 root root  12K Jun 16 04:02 lib
drwx------   2 root root  16K Jun 11 22:46 lost+found
drwxr-xr-x   2 root root 4.0K May 11  2011 media
drwxr-xr-x   2 root root 4.0K Nov  8  2010 misc
drwxr-xr-x   2 root root 4.0K May 11  2011 mnt
drwxr-xr-x   2 root root 4.0K May 11  2011 opt
dr-xr-xr-x 235 root root    0 Jun 15 11:04 proc
drwxr-x---   4 root root 4.0K Oct 15 14:43 root
drwxr-xr-x   2 root root  12K Jun 12 04:03 sbin
drwxr-xr-x   2 root root 4.0K May 11  2011 selinux
drwxr-xr-x   2 root root 4.0K May 11  2011 srv
drwxr-xr-x  11 root root    0 Jun 15 11:04 sys
drwxrwxrwt   3 root root  96K Oct 16 08:49 tmp
drwxr-xr-x  13 root root 4.0K Jun 11 23:38 usr
drwxr-xr-x  19 root root 4.0K Jun 11 23:38 var
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>显示文件夹信息</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@localhost /<span class="token punctuation">]</span><span class="token comment"># ls -ld /etc/</span>
</span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">drwxr-xr-x <span class="token number">75</span> root root <span class="token number">4096</span> Oct <span class="token number">16</span> 04:02 /etc/
</span></code><div onclick="copied(this)" data-code="[root@localhost /]# ls -ld /etc/

drwxr-xr-x 75 root root 4096 Oct 16 04:02 /etc/
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>按时间列出文件和文件夹详细信息</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@localhost /<span class="token punctuation">]</span><span class="token comment"># ls -lt</span>
</span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">total <span class="token number">254</span>
</span><span class="code-line line-number" line="4">drwxrwxrwt   <span class="token number">3</span> root root <span class="token number">98304</span> Oct <span class="token number">16</span> 08:53 tmp
</span><span class="code-line line-number" line="5">drwxr-xr-x  <span class="token number">75</span> root root  <span class="token number">4096</span> Oct <span class="token number">16</span> 04:02 etc
</span><span class="code-line line-number" line="6">drwxr-x---   <span class="token number">4</span> root root  <span class="token number">4096</span> Oct <span class="token number">15</span> <span class="token number">14</span>:43 root
</span><span class="code-line line-number" line="7">drwxr-xr-x  <span class="token number">10</span> root root  <span class="token number">3520</span> Sep <span class="token number">26</span> <span class="token number">15</span>:38 dev
</span><span class="code-line line-number" line="8">drwxr-xr-x  <span class="token number">14</span> root root <span class="token number">12288</span> Jun <span class="token number">16</span> 04:02 lib
</span><span class="code-line line-number" line="9">drwxr-xr-x   <span class="token number">4</span> root root  <span class="token number">1024</span> Jun <span class="token number">15</span> <span class="token number">14</span>:45 boot
</span><span class="code-line line-number" line="10">drwxr-xr-x  <span class="token number">11</span> root root     <span class="token number">0</span> Jun <span class="token number">15</span> <span class="token number">11</span>:04 sys
</span><span class="code-line line-number" line="11">dr-xr-xr-x <span class="token number">232</span> root root     <span class="token number">0</span> Jun <span class="token number">15</span> <span class="token number">11</span>:04 proc
</span><span class="code-line line-number" line="12">drwxr-xr-x   <span class="token number">6</span> root root  <span class="token number">4096</span> Jun <span class="token number">12</span> <span class="token number">10</span>:26 data
</span><span class="code-line line-number" line="13">drwxr-xr-x   <span class="token number">4</span> root root  <span class="token number">4096</span> Jun <span class="token number">12</span> <span class="token number">10</span>:26 home
</span><span class="code-line line-number" line="14">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> Jun <span class="token number">12</span> 04:03 bin
</span><span class="code-line line-number" line="15">drwxr-xr-x   <span class="token number">2</span> root root <span class="token number">12288</span> Jun <span class="token number">12</span> 04:03 sbin
</span><span class="code-line line-number" line="16">drwxr-xr-x  <span class="token number">13</span> root root  <span class="token number">4096</span> Jun <span class="token number">11</span> <span class="token number">23</span>:38 usr
</span><span class="code-line line-number" line="17">drwxr-xr-x  <span class="token number">19</span> root root  <span class="token number">4096</span> Jun <span class="token number">11</span> <span class="token number">23</span>:38 var
</span><span class="code-line line-number" line="18">drwx------   <span class="token number">2</span> root root <span class="token number">16384</span> Jun <span class="token number">11</span> <span class="token number">22</span>:46 lost+found
</span><span class="code-line line-number" line="19">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> media
</span><span class="code-line line-number" line="20">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> mnt
</span><span class="code-line line-number" line="21">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> opt
</span><span class="code-line line-number" line="22">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> selinux
</span><span class="code-line line-number" line="23">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> srv
</span><span class="code-line line-number" line="24">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> Nov  <span class="token number">8</span>  <span class="token number">2010</span> misc
</span></code><div onclick="copied(this)" data-code="[root@localhost /]# ls -lt

total 254
drwxrwxrwt   3 root root 98304 Oct 16 08:53 tmp
drwxr-xr-x  75 root root  4096 Oct 16 04:02 etc
drwxr-x---   4 root root  4096 Oct 15 14:43 root
drwxr-xr-x  10 root root  3520 Sep 26 15:38 dev
drwxr-xr-x  14 root root 12288 Jun 16 04:02 lib
drwxr-xr-x   4 root root  1024 Jun 15 14:45 boot
drwxr-xr-x  11 root root     0 Jun 15 11:04 sys
dr-xr-xr-x 232 root root     0 Jun 15 11:04 proc
drwxr-xr-x   6 root root  4096 Jun 12 10:26 data
drwxr-xr-x   4 root root  4096 Jun 12 10:26 home
drwxr-xr-x   2 root root  4096 Jun 12 04:03 bin
drwxr-xr-x   2 root root 12288 Jun 12 04:03 sbin
drwxr-xr-x  13 root root  4096 Jun 11 23:38 usr
drwxr-xr-x  19 root root  4096 Jun 11 23:38 var
drwx------   2 root root 16384 Jun 11 22:46 lost+found
drwxr-xr-x   2 root root  4096 May 11  2011 media
drwxr-xr-x   2 root root  4096 May 11  2011 mnt
drwxr-xr-x   2 root root  4096 May 11  2011 opt
drwxr-xr-x   2 root root  4096 May 11  2011 selinux
drwxr-xr-x   2 root root  4096 May 11  2011 srv
drwxr-xr-x   2 root root  4096 Nov  8  2010 misc
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>按修改时间列出文件和文件夹详细信息</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@localhost /<span class="token punctuation">]</span><span class="token comment"># ls -ltr</span>
</span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">total <span class="token number">254</span>
</span><span class="code-line line-number" line="4">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> Nov  <span class="token number">8</span>  <span class="token number">2010</span> misc
</span><span class="code-line line-number" line="5">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> srv
</span><span class="code-line line-number" line="6">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> selinux
</span><span class="code-line line-number" line="7">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> opt
</span><span class="code-line line-number" line="8">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> mnt
</span><span class="code-line line-number" line="9">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> May <span class="token number">11</span>  <span class="token number">2011</span> media
</span><span class="code-line line-number" line="10">drwx------   <span class="token number">2</span> root root <span class="token number">16384</span> Jun <span class="token number">11</span> <span class="token number">22</span>:46 lost+found
</span><span class="code-line line-number" line="11">drwxr-xr-x  <span class="token number">19</span> root root  <span class="token number">4096</span> Jun <span class="token number">11</span> <span class="token number">23</span>:38 var
</span><span class="code-line line-number" line="12">drwxr-xr-x  <span class="token number">13</span> root root  <span class="token number">4096</span> Jun <span class="token number">11</span> <span class="token number">23</span>:38 usr
</span><span class="code-line line-number" line="13">drwxr-xr-x   <span class="token number">2</span> root root <span class="token number">12288</span> Jun <span class="token number">12</span> 04:03 sbin
</span><span class="code-line line-number" line="14">drwxr-xr-x   <span class="token number">2</span> root root  <span class="token number">4096</span> Jun <span class="token number">12</span> 04:03 bin
</span><span class="code-line line-number" line="15">drwxr-xr-x   <span class="token number">4</span> root root  <span class="token number">4096</span> Jun <span class="token number">12</span> <span class="token number">10</span>:26 home
</span><span class="code-line line-number" line="16">drwxr-xr-x   <span class="token number">6</span> root root  <span class="token number">4096</span> Jun <span class="token number">12</span> <span class="token number">10</span>:26 data
</span><span class="code-line line-number" line="17">dr-xr-xr-x <span class="token number">232</span> root root     <span class="token number">0</span> Jun <span class="token number">15</span> <span class="token number">11</span>:04 proc
</span><span class="code-line line-number" line="18">drwxr-xr-x  <span class="token number">11</span> root root     <span class="token number">0</span> Jun <span class="token number">15</span> <span class="token number">11</span>:04 sys
</span><span class="code-line line-number" line="19">drwxr-xr-x   <span class="token number">4</span> root root  <span class="token number">1024</span> Jun <span class="token number">15</span> <span class="token number">14</span>:45 boot
</span><span class="code-line line-number" line="20">drwxr-xr-x  <span class="token number">14</span> root root <span class="token number">12288</span> Jun <span class="token number">16</span> 04:02 lib
</span><span class="code-line line-number" line="21">drwxr-xr-x  <span class="token number">10</span> root root  <span class="token number">3520</span> Sep <span class="token number">26</span> <span class="token number">15</span>:38 dev
</span><span class="code-line line-number" line="22">drwxr-x---   <span class="token number">4</span> root root  <span class="token number">4096</span> Oct <span class="token number">15</span> <span class="token number">14</span>:43 root
</span><span class="code-line line-number" line="23">drwxr-xr-x  <span class="token number">75</span> root root  <span class="token number">4096</span> Oct <span class="token number">16</span> 04:02 etc
</span><span class="code-line line-number" line="24">drwxrwxrwt   <span class="token number">3</span> root root <span class="token number">98304</span> Oct <span class="token number">16</span> 08:54 tmp
</span></code><div onclick="copied(this)" data-code="[root@localhost /]# ls -ltr

total 254
drwxr-xr-x   2 root root  4096 Nov  8  2010 misc
drwxr-xr-x   2 root root  4096 May 11  2011 srv
drwxr-xr-x   2 root root  4096 May 11  2011 selinux
drwxr-xr-x   2 root root  4096 May 11  2011 opt
drwxr-xr-x   2 root root  4096 May 11  2011 mnt
drwxr-xr-x   2 root root  4096 May 11  2011 media
drwx------   2 root root 16384 Jun 11 22:46 lost+found
drwxr-xr-x  19 root root  4096 Jun 11 23:38 var
drwxr-xr-x  13 root root  4096 Jun 11 23:38 usr
drwxr-xr-x   2 root root 12288 Jun 12 04:03 sbin
drwxr-xr-x   2 root root  4096 Jun 12 04:03 bin
drwxr-xr-x   4 root root  4096 Jun 12 10:26 home
drwxr-xr-x   6 root root  4096 Jun 12 10:26 data
dr-xr-xr-x 232 root root     0 Jun 15 11:04 proc
drwxr-xr-x  11 root root     0 Jun 15 11:04 sys
drwxr-xr-x   4 root root  1024 Jun 15 14:45 boot
drwxr-xr-x  14 root root 12288 Jun 16 04:02 lib
drwxr-xr-x  10 root root  3520 Sep 26 15:38 dev
drwxr-x---   4 root root  4096 Oct 15 14:43 root
drwxr-xr-x  75 root root  4096 Oct 16 04:02 etc
drwxrwxrwt   3 root root 98304 Oct 16 08:54 tmp
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>按照特殊字符对文件进行分类</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@localhost nginx-1.2.1<span class="token punctuation">]</span><span class="token comment"># ls -F</span>
</span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">auto/  CHANGES  CHANGES.ru  conf/  configure*  contrib/  html/  LICENSE  Makefile  man/  objs/  README  src/
</span></code><div onclick="copied(this)" data-code="[root@localhost nginx-1.2.1]# ls -F

auto/  CHANGES  CHANGES.ru  conf/  configure*  contrib/  html/  LICENSE  Makefile  man/  objs/  README  src/
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<p>列出文件并标记颜色分类</p>
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">[</span>root@localhost nginx-1.2.1<span class="token punctuation">]</span><span class="token comment"># ls --color=auto</span>
</span><span class="code-line line-number" line="2">
</span><span class="code-line line-number" line="3">auto  CHANGES  CHANGES.ru  conf  configure  contrib  html  LICENSE  Makefile  <span class="token function">man</span>  objs  README  src
</span></code><div onclick="copied(this)" data-code="[root@localhost nginx-1.2.1]# ls --color=auto

auto  CHANGES  CHANGES.ru  conf  configure  contrib  html  LICENSE  Makefile  man  objs  README  src
" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
<h2 id="扩展知识"><a class="anchor" aria-hidden="true" tabindex="-1" href="#扩展知识"><span class="octicon octicon-link"></span></a>扩展知识</h2>
<h3 id="不同颜色代表的文件类型"><a class="anchor" aria-hidden="true" tabindex="-1" href="#不同颜色代表的文件类型"><span class="octicon octicon-link"></span></a>不同颜色代表的文件类型</h3>
<ul>
  <li><code style="background: blue;color:white;">蓝色</code><!--rehype:style=background: blue;color:white;-->：目录</li>
  <li><code style="background: green;color:white;">绿色</code><!--rehype:style=background: green;color:white;-->：可执行文件</li>
  <li><code style="background: #efefef;">白色</code><!--rehype:style=background: #efefef;-->：一般性文件，如文本文件，配置文件等</li>
  <li><code style="background: red;color:white;">红色</code><!--rehype:style=background: red;color:white;-->：压缩文件或归档文件</li>
  <li><code style="background: #c4c3ff;">浅蓝色</code><!--rehype:style=background: #c4c3ff;-->：链接文件</li>
  <li>红色闪烁：链接文件存在问题</li>
  <li>黄色：设备文件</li>
  <li>青黄色：管道文件</li>
</ul>
<style>markdown-style pre .copied {
  display: flex;
  position: absolute;
  cursor: pointer;
  color: #a5afbb;
  top: 6px;
  right: 6px;
  border-radius: 5px;
  background: #82828226;
  padding: 6px;
  font-size: 12px;
  transition: all .3s;
}
markdown-style pre .copied:not(.active) {
  visibility: hidden;
}
markdown-style pre:hover .copied {
  visibility: visible;
}
markdown-style pre:hover .copied:hover {
  background: #4caf50;
  color: #fff;
}
markdown-style pre:hover .copied:active,
markdown-style pre .copied.active {
  background: #2e9b33;
  color: #fff;
}
markdown-style pre .copied .octicon-copy {
  display: block;
}
markdown-style pre .copied .octicon-check {
  display: none;
}
markdown-style pre .active .octicon-copy {
  display: none;
}
markdown-style pre .active .octicon-check {
  display: block;
}</style><script>/*! @uiw/copy-to-clipboard v1.0.12 | MIT (c) 2021 Kenny Wang | https://github.com/uiwjs/copy-to-clipboard.git */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).copyTextToClipboard=t()}(this,(function(){"use strict";return function(e,t){const o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style={position:"absolute",left:"-9999px"},document.body.appendChild(o);const n=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);o.select();let c=!1;try{c=!!document.execCommand("copy")}catch(e){c=!1}document.body.removeChild(o),n&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(n)),t&&t(c)}}));

function copied(target, str) {
  target.classList.add('active');
  copyTextToClipboard(target.dataset.code, function() {
    setTimeout(() => {
      target.classList.remove('active');
    }, 2000);
  });
}</script></markdown-style>

</div>

<div class="roc-footer"></div>
<script type="text/javascript" src="../js/dt.js?v=1667366370134"></script>
<script type="text/javascript" src="../js/index.js?v=1667366370134"></script>
</body>
</html>